mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02: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:
@@ -163,7 +163,7 @@ class MempoolPackagesTest(BitcoinTestFramework):
|
||||
# Check that prioritising a tx before it's added to the mempool works
|
||||
# First clear the mempool by mining a block.
|
||||
self.nodes[0].generate(1)
|
||||
sync_blocks(self.nodes)
|
||||
self.sync_blocks()
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
||||
# Prioritise a transaction that has been mined, then add it back to the
|
||||
# mempool by using invalidateblock.
|
||||
@@ -228,7 +228,7 @@ class MempoolPackagesTest(BitcoinTestFramework):
|
||||
# Test reorg handling
|
||||
# First, the basics:
|
||||
self.nodes[0].generate(1)
|
||||
sync_blocks(self.nodes)
|
||||
self.sync_blocks()
|
||||
self.nodes[1].invalidateblock(self.nodes[0].getbestblockhash())
|
||||
self.nodes[1].reconsiderblock(self.nodes[0].getbestblockhash())
|
||||
|
||||
@@ -283,12 +283,12 @@ class MempoolPackagesTest(BitcoinTestFramework):
|
||||
rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx)
|
||||
txid = self.nodes[0].sendrawtransaction(signedtx['hex'])
|
||||
sync_mempools(self.nodes)
|
||||
self.sync_mempools()
|
||||
|
||||
# Now try to disconnect the tip on each node...
|
||||
self.nodes[1].invalidateblock(self.nodes[1].getbestblockhash())
|
||||
self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
|
||||
sync_blocks(self.nodes)
|
||||
self.sync_blocks()
|
||||
|
||||
if __name__ == '__main__':
|
||||
MempoolPackagesTest().main()
|
||||
|
||||
Reference in New Issue
Block a user