Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_listsinceblock.py
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | def test_double_spend(self): | ||||
self.join_network() | self.join_network() | ||||
self.sync_all() | self.sync_all() | ||||
# gettransaction should work for txid1 | # gettransaction should work for txid1 | ||||
assert self.nodes[0].gettransaction( | assert self.nodes[0].gettransaction( | ||||
txid1)['txid'] == txid1, "gettransaction failed to find txid1" | txid1)['txid'] == txid1, "gettransaction failed to find txid1" | ||||
# listsinceblock(lastblockhash) should now include txid1, as seen from nodes[0] | # listsinceblock(lastblockhash) should now include txid1, as seen from | ||||
# nodes[0] | |||||
lsbres = self.nodes[0].listsinceblock(lastblockhash) | lsbres = self.nodes[0].listsinceblock(lastblockhash) | ||||
assert any(tx['txid'] == txid1 for tx in lsbres['removed']) | assert any(tx['txid'] == txid1 for tx in lsbres['removed']) | ||||
# but it should not include 'removed' if include_removed=false | # but it should not include 'removed' if include_removed=false | ||||
lsbres2 = self.nodes[0].listsinceblock( | lsbres2 = self.nodes[0].listsinceblock( | ||||
blockhash=lastblockhash, include_removed=False) | blockhash=lastblockhash, include_removed=False) | ||||
assert 'removed' not in lsbres2 | assert 'removed' not in lsbres2 | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |