Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_txn_doublespend.py
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# Node0's total balance should be starting balance, plus 100BTC for | # Node0's total balance should be starting balance, plus 100BTC for | ||||
# two more matured blocks, minus 1240 for the double-spend, plus fees (which are | # two more matured blocks, minus 1240 for the double-spend, plus fees (which are | ||||
# negative): | # negative): | ||||
expected = starting_balance + 100 - 1240 + \ | expected = starting_balance + 100 - 1240 + \ | ||||
fund_foo_tx["fee"] + fund_bar_tx["fee"] + doublespend_fee | fund_foo_tx["fee"] + fund_bar_tx["fee"] + doublespend_fee | ||||
assert_equal(self.nodes[0].getbalance(), expected) | assert_equal(self.nodes[0].getbalance(), expected) | ||||
# Node1's balance should be its initial balance (1250 for 25 block rewards) plus the doublespend: | # Node1's balance should be its initial balance (1250 for 25 block | ||||
# rewards) plus the doublespend: | |||||
assert_equal(self.nodes[1].getbalance(), 1250 + 1240) | assert_equal(self.nodes[1].getbalance(), 1250 + 1240) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
TxnMallTest().main() | TxnMallTest().main() |