Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_listsinceblock.py
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | def test_reorg(self): | ||||
# send to nodes[0] from nodes[2] | # send to nodes[0] from nodes[2] | ||||
senttx = self.nodes[2].sendtoaddress(self.nodes[0].getnewaddress(), 1) | senttx = self.nodes[2].sendtoaddress(self.nodes[0].getnewaddress(), 1) | ||||
# generate on both sides | # generate on both sides | ||||
lastblockhash = self.nodes[1].generate(6)[5] | lastblockhash = self.nodes[1].generate(6)[5] | ||||
self.nodes[2].generate(7) | self.nodes[2].generate(7) | ||||
self.log.info('lastblockhash={}'.format(lastblockhash)) | self.log.info('lastblockhash={}'.format(lastblockhash)) | ||||
self.sync_all([self.nodes[:2], self.nodes[2:]]) | self.sync_all(self.nodes[:2]) | ||||
self.sync_all(self.nodes[2:]) | |||||
self.join_network() | self.join_network() | ||||
# listsinceblock(lastblockhash) should now include tx, as seen from | # listsinceblock(lastblockhash) should now include tx, as seen from | ||||
# nodes[0] | # nodes[0] | ||||
lsbres = self.nodes[0].listsinceblock(lastblockhash) | lsbres = self.nodes[0].listsinceblock(lastblockhash) | ||||
found = False | found = False | ||||
for tx in lsbres['transactions']: | for tx in lsbres['transactions']: | ||||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |