mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
rpc/gui: Remove 'Unknown block versions being mined' warning
Due to miners inserting garbage into the version numbers, the current version signalling has become completely useless. This removes the "unknown block versions" warning which has the tendency to scare users unnecessarily (and might get them to "update" to something bad). It preserves the warning in the logs. Whether this is desirable can be a point of discussion.
This commit is contained in:
@@ -66,23 +66,7 @@ class NotificationsTest(BitcoinTestFramework):
|
||||
txids_rpc = list(map(lambda t: t['txid'], self.nodes[1].listtransactions("*", block_count)))
|
||||
assert_equal(sorted(txids_rpc), sorted(os.listdir(self.walletnotify_dir)))
|
||||
|
||||
# Mine another 41 up-version blocks. -alertnotify should trigger on the 51st.
|
||||
self.log.info("test -alertnotify")
|
||||
self.nodes[1].generatetoaddress(41, ADDRESS_BCRT1_UNSPENDABLE)
|
||||
self.sync_all()
|
||||
|
||||
# Give bitcoind 10 seconds to write the alert notification
|
||||
wait_until(lambda: len(os.listdir(self.alertnotify_dir)), timeout=10)
|
||||
|
||||
for notify_file in os.listdir(self.alertnotify_dir):
|
||||
os.remove(os.path.join(self.alertnotify_dir, notify_file))
|
||||
|
||||
# Mine more up-version blocks, should not get more alerts:
|
||||
self.nodes[1].generatetoaddress(2, ADDRESS_BCRT1_UNSPENDABLE)
|
||||
self.sync_all()
|
||||
|
||||
self.log.info("-alertnotify should not continue notifying for more unknown version blocks")
|
||||
assert_equal(len(os.listdir(self.alertnotify_dir)), 0)
|
||||
# TODO: add test for `-alertnotify` large fork notifications
|
||||
|
||||
if __name__ == '__main__':
|
||||
NotificationsTest().main()
|
||||
|
Reference in New Issue
Block a user