mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-28 16:36:04 +01:00
rpc: Round verificationprogress to exactly 1 for a recent tip
This requires a new lock annotation, but all relevant callers already held the lock.
This commit is contained in:
@@ -286,7 +286,13 @@ class BlockchainTest(BitcoinTestFramework):
|
||||
future = 2 * 60 * 60
|
||||
self.nodes[0].setmocktime(self.nodes[0].getblockchaininfo()["time"] + future + 1)
|
||||
assert_greater_than(1, self.nodes[0].getblockchaininfo()["verificationprogress"])
|
||||
|
||||
self.log.info("Check that verificationprogress is exactly 1 for a recent block tip")
|
||||
self.nodes[0].setmocktime(self.nodes[0].getblockchaininfo()["time"] + future)
|
||||
assert_equal(1, self.nodes[0].getblockchaininfo()["verificationprogress"])
|
||||
|
||||
self.log.info("Check that verificationprogress is less than 1 as soon as a new header comes in")
|
||||
self.nodes[0].submitheader(self.generateblock(self.nodes[0], output="raw(55)", transactions=[], submit=False, sync_fun=self.no_op)["hex"])
|
||||
assert_greater_than(1, self.nodes[0].getblockchaininfo()["verificationprogress"])
|
||||
|
||||
def _test_y2106(self):
|
||||
|
||||
Reference in New Issue
Block a user