mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-18 11:37:40 +02:00
Merge bitcoin/bitcoin#30212: rename TransactionError:ALREADY_IN_CHAIN
e9de0a76b9doc: release note for 30212 (willcl-ark)87b1880525rpc: clarify ALREADY_IN_CHAIN rpc errors (willcl-ark) Pull request description: Closes: #19363 Renaming this error improves clarity around the returned error both internally and externally when a transactions' outputs are already found in the utxo set (`TransactionError::ALREADY_IN_CHAIN -> TransactionError::ALREADY_IN_UTXO_SET`) ACKs for top commit: tdb3: ACKe9de0a76b9ismaelsadeeq: ACKe9de0a76b9ryanofsky: Code review ACKe9de0a76b9. Tree-SHA512: 7d2617200909790340951fe56a241448f9ce511900777cb2a712e8b9c0778a27d1f912b460f82335844224f1abb4322bc898ca076440959edade55c082a09237
This commit is contained in:
@@ -430,13 +430,13 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
assert_equal(testres['allowed'], True)
|
||||
self.nodes[2].sendrawtransaction(hexstring=tx['hex'], maxfeerate='0.20000000')
|
||||
|
||||
self.log.info("Test sendrawtransaction/testmempoolaccept with tx already in the chain")
|
||||
self.log.info("Test sendrawtransaction/testmempoolaccept with tx outputs already in the utxo set")
|
||||
self.generate(self.nodes[2], 1)
|
||||
for node in self.nodes:
|
||||
testres = node.testmempoolaccept([tx['hex']])[0]
|
||||
assert_equal(testres['allowed'], False)
|
||||
assert_equal(testres['reject-reason'], 'txn-already-known')
|
||||
assert_raises_rpc_error(-27, 'Transaction already in block chain', node.sendrawtransaction, tx['hex'])
|
||||
assert_raises_rpc_error(-27, 'Transaction outputs already in utxo set', node.sendrawtransaction, tx['hex'])
|
||||
|
||||
def decoderawtransaction_tests(self):
|
||||
self.log.info("Test decoderawtransaction")
|
||||
|
||||
Reference in New Issue
Block a user