mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-26 14:00:29 +01:00
scripted-diff: use self.sync_* methods
-BEGIN VERIFY SCRIPT- sed -i -e 's/sync_blocks(self.nodes)/self.sync_blocks()/g' $(git grep -l 'sync_blocks(self.nodes)' ./test/functional/*.py) sed -i -e 's/sync_mempools(self.nodes)/self.sync_mempools()/g' $(git grep -l 'sync_mempools(self.nodes)' ./test/functional/*.py) sed -i -e 's/ sync_blocks(/ self.sync_blocks(/g' $(git grep -l sync_blocks ./test/functional/*.py) sed -i -e 's/ sync_mempools(/ self.sync_mempools(/g' $(git grep -l sync_mempools ./test/functional/*.py) -END VERIFY SCRIPT-
This commit is contained in:
@@ -100,7 +100,7 @@ class PruneTest(BitcoinTestFramework):
|
||||
connect_nodes(self.nodes[0], 2)
|
||||
connect_nodes(self.nodes[0], 3)
|
||||
connect_nodes(self.nodes[0], 4)
|
||||
sync_blocks(self.nodes[0:5])
|
||||
self.sync_blocks(self.nodes[0:5])
|
||||
|
||||
def setup_nodes(self):
|
||||
self.add_nodes(self.num_nodes, self.extra_args)
|
||||
@@ -111,13 +111,13 @@ class PruneTest(BitcoinTestFramework):
|
||||
def create_big_chain(self):
|
||||
# Start by creating some coinbases we can spend later
|
||||
self.nodes[1].generate(200)
|
||||
sync_blocks(self.nodes[0:2])
|
||||
self.sync_blocks(self.nodes[0:2])
|
||||
self.nodes[0].generate(150)
|
||||
|
||||
# Then mine enough full blocks to create more than 550MiB of data
|
||||
mine_large_blocks(self.nodes[0], 645)
|
||||
|
||||
sync_blocks(self.nodes[0:5])
|
||||
self.sync_blocks(self.nodes[0:5])
|
||||
|
||||
def test_height_min(self):
|
||||
assert os.path.isfile(os.path.join(self.prunedir, "blk00000.dat")), "blk00000.dat is missing, pruning too early"
|
||||
@@ -153,7 +153,7 @@ class PruneTest(BitcoinTestFramework):
|
||||
# Create connections in the order so both nodes can see the reorg at the same time
|
||||
connect_nodes(self.nodes[0], 1)
|
||||
connect_nodes(self.nodes[0], 2)
|
||||
sync_blocks(self.nodes[0:3])
|
||||
self.sync_blocks(self.nodes[0:3])
|
||||
|
||||
self.log.info("Usage can be over target because of high stale rate: %d" % calc_usage(self.prunedir))
|
||||
|
||||
@@ -190,7 +190,7 @@ class PruneTest(BitcoinTestFramework):
|
||||
self.log.info("Reconnect nodes")
|
||||
connect_nodes(self.nodes[0], 1)
|
||||
connect_nodes(self.nodes[1], 2)
|
||||
sync_blocks(self.nodes[0:3], timeout=120)
|
||||
self.sync_blocks(self.nodes[0:3], timeout=120)
|
||||
|
||||
self.log.info("Verify height on node 2: %d" % self.nodes[2].getblockcount())
|
||||
self.log.info("Usage possibly still high because of stale blocks in block files: %d" % calc_usage(self.prunedir))
|
||||
@@ -345,7 +345,7 @@ class PruneTest(BitcoinTestFramework):
|
||||
self.log.info("Syncing node 5 to test wallet")
|
||||
connect_nodes(self.nodes[0], 5)
|
||||
nds = [self.nodes[0], self.nodes[5]]
|
||||
sync_blocks(nds, wait=5, timeout=300)
|
||||
self.sync_blocks(nds, wait=5, timeout=300)
|
||||
self.stop_node(5) # stop and start to trigger rescan
|
||||
self.start_node(5, extra_args=["-prune=550"])
|
||||
self.log.info("Success")
|
||||
|
||||
Reference in New Issue
Block a user