mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-02 19:52:01 +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:
@ -33,12 +33,12 @@ class AbandonConflictTest(BitcoinTestFramework):
|
||||
|
||||
def run_test(self):
|
||||
self.nodes[1].generate(100)
|
||||
sync_blocks(self.nodes)
|
||||
self.sync_blocks()
|
||||
balance = self.nodes[0].getbalance()
|
||||
txA = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), Decimal("10"))
|
||||
txB = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), Decimal("10"))
|
||||
txC = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), Decimal("10"))
|
||||
sync_mempools(self.nodes)
|
||||
self.sync_mempools()
|
||||
self.nodes[1].generate(1)
|
||||
|
||||
# Can not abandon non-wallet transaction
|
||||
@ -46,7 +46,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
||||
# Can not abandon confirmed transaction
|
||||
assert_raises_rpc_error(-5, 'Transaction not eligible for abandonment', lambda: self.nodes[0].abandontransaction(txid=txA))
|
||||
|
||||
sync_blocks(self.nodes)
|
||||
self.sync_blocks()
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
assert balance - newbalance < Decimal("0.001") #no more than fees lost
|
||||
balance = newbalance
|
||||
@ -163,7 +163,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
||||
self.nodes[1].generate(1)
|
||||
|
||||
connect_nodes(self.nodes[0], 1)
|
||||
sync_blocks(self.nodes)
|
||||
self.sync_blocks()
|
||||
|
||||
# Verify that B and C's 10 BTC outputs are available for spending again because AB1 is now conflicted
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
|
Reference in New Issue
Block a user