Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-transaction-ordering.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2018 The Bitcoin developers | # Copyright (c) 2018 The Bitcoin 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. | ||||
""" | """ | ||||
This test checks that the node software accepts transactions in | This test checks that the node software accepts transactions in | ||||
non topological order once the feature is activated. | non topological order once the feature is activated. | ||||
""" | """ | ||||
from collections import deque | |||||
import random | import random | ||||
import time | import time | ||||
from collections import deque | |||||
from test_framework.blocktools import ( | from test_framework.blocktools import ( | ||||
create_block, | create_block, | ||||
create_coinbase, | create_coinbase, | ||||
make_conform_to_ctor, | make_conform_to_ctor, | ||||
) | ) | ||||
from test_framework.messages import ( | from test_framework.messages import COutPoint, CTransaction, CTxIn, CTxOut | ||||
COutPoint, | |||||
CTransaction, | |||||
CTxIn, | |||||
CTxOut, | |||||
) | |||||
from test_framework.p2p import P2PDataStore | from test_framework.p2p import P2PDataStore | ||||
from test_framework.script import ( | from test_framework.script import OP_RETURN, OP_TRUE, CScript | ||||
CScript, | |||||
OP_RETURN, | |||||
OP_TRUE, | |||||
) | |||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
class PreviousSpendableOutput(): | class PreviousSpendableOutput(): | ||||
def __init__(self, tx=CTransaction(), n=-1): | def __init__(self, tx=CTransaction(), n=-1): | ||||
self.tx = tx | self.tx = tx | ||||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |