mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Merge 2aa63d511a
into c5e44a0435
This commit is contained in:
commit
1d6f1a722f
1 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ def mine_large_blocks(node, n):
|
||||||
# Set the nTime if this is the first time this function has been called.
|
# Set the nTime if this is the first time this function has been called.
|
||||||
# A static variable ensures that time is monotonicly increasing and is therefore
|
# A static variable ensures that time is monotonicly increasing and is therefore
|
||||||
# different for each block created => blockhash is unique.
|
# different for each block created => blockhash is unique.
|
||||||
if "nTimes" not in mine_large_blocks.__dict__:
|
if "nTime" not in mine_large_blocks.__dict__:
|
||||||
mine_large_blocks.nTime = 0
|
mine_large_blocks.nTime = 0
|
||||||
|
|
||||||
# Get the block parameters for the first block
|
# Get the block parameters for the first block
|
||||||
|
@ -498,11 +498,11 @@ class PruneTest(BitcoinTestFramework):
|
||||||
"start", [{"desc": f"raw({false_positive_spk.hex()})"}], 0, 0, "basic", {"filter_false_positives": True})
|
"start", [{"desc": f"raw({false_positive_spk.hex()})"}], 0, 0, "basic", {"filter_false_positives": True})
|
||||||
|
|
||||||
def test_pruneheight_undo_presence(self):
|
def test_pruneheight_undo_presence(self):
|
||||||
node = self.nodes[2]
|
node = self.nodes[5]
|
||||||
pruneheight = node.getblockchaininfo()["pruneheight"]
|
pruneheight = node.getblockchaininfo()["pruneheight"]
|
||||||
fetch_block = node.getblockhash(pruneheight - 1)
|
fetch_block = node.getblockhash(pruneheight - 1)
|
||||||
|
|
||||||
self.connect_nodes(1, 2)
|
self.connect_nodes(1, 5)
|
||||||
peers = node.getpeerinfo()
|
peers = node.getpeerinfo()
|
||||||
node.getblockfrompeer(fetch_block, peers[0]["id"])
|
node.getblockfrompeer(fetch_block, peers[0]["id"])
|
||||||
self.wait_until(lambda: not try_rpc(-1, "Block not available (pruned data)", node.getblock, fetch_block), timeout=5)
|
self.wait_until(lambda: not try_rpc(-1, "Block not available (pruned data)", node.getblock, fetch_block), timeout=5)
|
||||||
|
|
Loading…
Add table
Reference in a new issue