Fix (most) rpc tests by updating balances. zcpour, zcpourdoublespend, and txn_doublespend currently fail.
This commit is contained in:
@@ -10,7 +10,7 @@ Test case is:
|
||||
4 nodes. 1 2 and 3 send transactions between each other,
|
||||
fourth node is a miner.
|
||||
1 2 3 each mine a block to start, then
|
||||
Miner creates 100 blocks so 1 2 3 each have 50 mature
|
||||
Miner creates 100 blocks so 1 2 3 each have 40 mature
|
||||
coins to spend.
|
||||
Then 5 iterations of 1/2/3 sending coins amongst
|
||||
themselves to get transactions in the wallets,
|
||||
@@ -23,7 +23,7 @@ Miner then generates 101 more blocks, so any
|
||||
transaction fees paid mature.
|
||||
|
||||
Sanity check:
|
||||
Sum(1,2,3,4 balances) == 114*50
|
||||
Sum(1,2,3,4 balances) == 114*40
|
||||
|
||||
1/2/3 are shutdown, and their wallets erased.
|
||||
Then restore using wallet.dat backup. And
|
||||
@@ -110,9 +110,9 @@ class WalletBackupTest(BitcoinTestFramework):
|
||||
self.nodes[3].generate(100)
|
||||
sync_blocks(self.nodes)
|
||||
|
||||
assert_equal(self.nodes[0].getbalance(), 50)
|
||||
assert_equal(self.nodes[1].getbalance(), 50)
|
||||
assert_equal(self.nodes[2].getbalance(), 50)
|
||||
assert_equal(self.nodes[0].getbalance(), 40)
|
||||
assert_equal(self.nodes[1].getbalance(), 40)
|
||||
assert_equal(self.nodes[2].getbalance(), 40)
|
||||
assert_equal(self.nodes[3].getbalance(), 0)
|
||||
|
||||
logging.info("Creating transactions")
|
||||
@@ -144,8 +144,8 @@ class WalletBackupTest(BitcoinTestFramework):
|
||||
total = balance0 + balance1 + balance2 + balance3
|
||||
|
||||
# At this point, there are 214 blocks (103 for setup, then 10 rounds, then 101.)
|
||||
# 114 are mature, so the sum of all wallets should be 114 * 50 = 5700.
|
||||
assert_equal(total, 5700)
|
||||
# 114 are mature, so the sum of all wallets should be 114 * 40 = 4560.
|
||||
assert_equal(total, 4560)
|
||||
|
||||
##
|
||||
# Test restoring spender wallets from backups
|
||||
|
||||
Reference in New Issue
Block a user