mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-02 03:31:35 +02:00
rpc: clarify ALREADY_IN_CHAIN rpc errors
When using `sendrawtransaction` the ALREADY_IN_CHAIN error help string may be confusing. Rename TransactionError::ALREADY_IN_CHAIN to TransactionError::ALREADY_IN_UTXO_SET and update the rpc help string. Remove backwards compatibility alias as no longer required.
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