Skip to content

Commit

Permalink
Check upgrade status in wallet_overwintertx RPC test
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Feb 22, 2018
1 parent ed9aa2b commit 4c3d2b3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions qa/rpc-tests/wallet_overwintertx.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ def run_test (self):
#
# Currently at block 198. The next block to be mined 199 is a Sprout block
#
assert_equal(self.nodes[0].getblockchaininfo()['consensus']['chaintip'], '00000000')
assert_equal(self.nodes[0].getblockchaininfo()['consensus']['nextblock'], '00000000')
bci = self.nodes[0].getblockchaininfo()
assert_equal(bci['consensus']['chaintip'], '00000000')
assert_equal(bci['consensus']['nextblock'], '00000000')
assert_equal(bci['upgrades']['5ba81b19']['status'], 'pending')

taddr0 = self.nodes[0].getnewaddress()
taddr2 = self.nodes[2].getnewaddress()
Expand Down Expand Up @@ -79,8 +81,10 @@ def run_test (self):
#
# Currently at block 199. The next block to be mined 200 is an Overwinter block
#
assert_equal(self.nodes[0].getblockchaininfo()['consensus']['chaintip'], '00000000')
assert_equal(self.nodes[0].getblockchaininfo()['consensus']['nextblock'], '5ba81b19')
bci = self.nodes[0].getblockchaininfo()
assert_equal(bci['consensus']['chaintip'], '00000000')
assert_equal(bci['consensus']['nextblock'], '5ba81b19')
assert_equal(bci['upgrades']['5ba81b19']['status'], 'pending')

# Send taddr to taddr
tsendamount = Decimal('4.56')
Expand All @@ -97,8 +101,10 @@ def run_test (self):
self.sync_all()
self.nodes[0].generate(1)
self.sync_all()
assert_equal(self.nodes[0].getblockchaininfo()['consensus']['chaintip'], '5ba81b19')
assert_equal(self.nodes[0].getblockchaininfo()['consensus']['nextblock'], '5ba81b19')
bci = self.nodes[0].getblockchaininfo()
assert_equal(bci['consensus']['chaintip'], '5ba81b19')
assert_equal(bci['consensus']['nextblock'], '5ba81b19')
assert_equal(bci['upgrades']['5ba81b19']['status'], 'active')

# Verify balance
assert_equal(self.nodes[3].getbalance(), tsendamount)
Expand Down

0 comments on commit 4c3d2b3

Please sign in to comment.