Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-miner-fund.py
Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | def run_miner_fund_test(self, bit, name, fund_address): | ||||
assert_greater_than_or_equal( | assert_greater_than_or_equal( | ||||
total / MINER_FUND_RATIO, | total / MINER_FUND_RATIO, | ||||
coinbase['vout'][1]['value']) | coinbase['vout'][1]['value']) | ||||
# Invalidate top block, submit a custom block that do not send anything | # Invalidate top block, submit a custom block that do not send anything | ||||
# to the fund and check it is rejected. | # to the fund and check it is rejected. | ||||
node.invalidateblock(node.getbestblockhash()) | node.invalidateblock(node.getbestblockhash()) | ||||
block_height = node.getblockcount() | block_height = node.getblockcount() + 1 | ||||
block = create_block( | block = create_block( | ||||
fork_block_hash, create_coinbase(block_height), PHONON_ACTIVATION_TIME + 99) | fork_block_hash, create_coinbase(block_height), PHONON_ACTIVATION_TIME + 99, version=4) | ||||
block.solve() | block.solve() | ||||
assert_equal(node.submitblock(ToHex(block)), 'bad-cb-minerfund') | assert_equal(node.submitblock(ToHex(block)), 'bad-cb-minerfund') | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
MinerFundTest().main() | MinerFundTest().main() |