diff options
author | willcl-ark <will@256k1.dev> | 2024-06-13 08:20:53 +0100 |
---|---|---|
committer | willcl-ark <will@256k1.dev> | 2024-08-05 15:45:58 +0100 |
commit | 87b188052528e97729a85d9701864eaff1ea5ec6 (patch) | |
tree | f9344c8f27424f063565e1915d1aa01b36376a50 /src/node | |
parent | f0d08550a0b4b2ea9f6bd05b76e9f21ffb707774 (diff) |
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.
Diffstat (limited to 'src/node')
-rw-r--r-- | src/node/transaction.cpp | 2 | ||||
-rw-r--r-- | src/node/types.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/node/transaction.cpp b/src/node/transaction.cpp index 591dcd698d..0f45da45db 100644 --- a/src/node/transaction.cpp +++ b/src/node/transaction.cpp @@ -55,7 +55,7 @@ TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef t const Coin& existingCoin = view.AccessCoin(COutPoint(txid, o)); // IsSpent doesn't mean the coin is spent, it means the output doesn't exist. // So if the output does exist, then this transaction exists in the chain. - if (!existingCoin.IsSpent()) return TransactionError::ALREADY_IN_CHAIN; + if (!existingCoin.IsSpent()) return TransactionError::ALREADY_IN_UTXO_SET; } if (auto mempool_tx = node.mempool->get(txid); mempool_tx) { diff --git a/src/node/types.h b/src/node/types.h index bb8d17ef43..1302f1b127 100644 --- a/src/node/types.h +++ b/src/node/types.h @@ -19,7 +19,7 @@ namespace node { enum class TransactionError { OK, //!< No error MISSING_INPUTS, - ALREADY_IN_CHAIN, + ALREADY_IN_UTXO_SET, MEMPOOL_REJECTED, MEMPOOL_ERROR, MAX_FEE_EXCEEDED, |