Skip to content

Commit 74d23bf

Browse files
committed
rpc: document RPC_TRANSACTION_ALREADY_IN_CHAIN exception
It is not documented that if you attempt to send a transaction which already exists in a block, an RPC_TRANSACTION_ALREADY_IN_CHAIN exception will be raised. This should be documented so that developers are aware that this exception is raised.
1 parent c175690 commit 74d23bf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rpc/rawtransaction.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,11 @@ static RPCHelpMan sendrawtransaction()
816816
{
817817
return RPCHelpMan{"sendrawtransaction",
818818
"\nSubmit a raw transaction (serialized, hex-encoded) to local node and network.\n"
819-
"\nNote that the transaction will be sent unconditionally to all peers, so using this\n"
819+
"\nThe transaction will be sent unconditionally to all peers, so using sendrawtransaction\n"
820820
"for manual rebroadcast may degrade privacy by leaking the transaction's origin, as\n"
821821
"nodes will normally not rebroadcast non-wallet transactions already in their mempool.\n"
822-
"\nAlso see createrawtransaction and signrawtransactionwithkey calls.\n",
822+
"\nA specific exception, RPC_TRANSACTION_ALREADY_IN_CHAIN, may throw if the transaction cannot be added to the mempool.\n"
823+
"\nRelated RPCs: createrawtransaction, signrawtransactionwithkey\n",
823824
{
824825
{"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hex string of the raw transaction"},
825826
{"maxfeerate", RPCArg::Type::AMOUNT, /* default */ FormatMoney(DEFAULT_MAX_RAW_TX_FEE_RATE.GetFeePerK()),

0 commit comments

Comments
 (0)