Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool_accept.py
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
'allowed': False, | 'allowed': False, | ||||
'reject-reason': 'txn-mempool-conflict'}], | 'reject-reason': 'txn-mempool-conflict'}], | ||||
rawtxs=[tx.serialize().hex()], | rawtxs=[tx.serialize().hex()], | ||||
maxfeerate=0, | maxfeerate=0, | ||||
) | ) | ||||
self.log.info('A transaction with missing inputs, that never existed') | self.log.info('A transaction with missing inputs, that never existed') | ||||
tx = FromHex(CTransaction(), raw_tx_0) | tx = FromHex(CTransaction(), raw_tx_0) | ||||
tx.vin[0].prevout = COutPoint(hash=int('ff' * 32, 16), n=14) | tx.vin[0].prevout = COutPoint(txid=int('ff' * 32, 16), n=14) | ||||
# skip re-signing the tx | # skip re-signing the tx | ||||
self.check_mempool_result( | self.check_mempool_result( | ||||
result_expected=[ | result_expected=[ | ||||
{'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'missing-inputs'}], | {'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'missing-inputs'}], | ||||
rawtxs=[ToHex(tx)], | rawtxs=[ToHex(tx)], | ||||
) | ) | ||||
self.log.info( | self.log.info( | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.check_mempool_result( | self.check_mempool_result( | ||||
result_expected=[{'txid': tx.rehash( | result_expected=[{'txid': tx.rehash( | ||||
), 'allowed': False, 'reject-reason': 'bad-txns-inputs-duplicate'}], | ), 'allowed': False, 'reject-reason': 'bad-txns-inputs-duplicate'}], | ||||
rawtxs=[ToHex(tx)], | rawtxs=[ToHex(tx)], | ||||
) | ) | ||||
self.log.info('A non-coinbase transaction with coinbase-like outpoint') | self.log.info('A non-coinbase transaction with coinbase-like outpoint') | ||||
tx = FromHex(CTransaction(), raw_tx_reference) | tx = FromHex(CTransaction(), raw_tx_reference) | ||||
tx.vin.append(CTxIn(COutPoint(hash=0, n=0xffffffff))) | tx.vin.append(CTxIn(COutPoint(txid=0, n=0xffffffff))) | ||||
self.check_mempool_result( | self.check_mempool_result( | ||||
result_expected=[{'txid': tx.rehash(), | result_expected=[{'txid': tx.rehash(), | ||||
'allowed': False, | 'allowed': False, | ||||
'reject-reason': 'bad-txns-prevout-null'}], | 'reject-reason': 'bad-txns-prevout-null'}], | ||||
rawtxs=[tx.serialize().hex()], | rawtxs=[tx.serialize().hex()], | ||||
) | ) | ||||
self.log.info('A coinbase transaction') | self.log.info('A coinbase transaction') | ||||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |