Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool_spend_coinbase.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2016 The Bitcoin Core developers | # Copyright (c) 2014-2016 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Test spending coinbase transactions. | |||||
# | The coinbase transaction in block N can appear in block | ||||
# Test spending coinbase transactions. | N+100... so is valid in the mempool when the best block | ||||
# The coinbase transaction in block N can appear in block | height is N+99. | ||||
# N+100... so is valid in the mempool when the best block | This test makes sure coinbase spends that will be mature | ||||
# height is N+99. | in the next block are accepted into the memory pool, | ||||
# This test makes sure coinbase spends that will be mature | but less mature coinbase spends are NOT. | ||||
# in the next block are accepted into the memory pool, | """ | ||||
# but less mature coinbase spends are NOT. | |||||
# | |||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal, assert_raises_rpc_error, create_tx | from test_framework.util import assert_equal, assert_raises_rpc_error, create_tx | ||||
# Create one-input, one-output, no-fee transaction: | # Create one-input, one-output, no-fee transaction: | ||||
class MempoolSpendCoinbaseTest(BitcoinTestFramework): | class MempoolSpendCoinbaseTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
Show All 36 Lines |