Skip to content

Commit 36167fa

Browse files
committed
[logging/documentation] Remove reference to AcceptToMemoryPool from error string
User-facing error messages should not leak internal implementation details like function names. Update the MEMPOOL_REJECTED error string from "Transaction rejected by AcceptToMemoryPool" to the more generic "Transaction rejected by mempool". Also update the MEMPOOL_ERROR error message from "AcceptToMemoryPool failed" to the more precise "Mempool internal error" since this error indicates and internal (e.g. logic/hardware/etc) failure, and not a transaction rejection.
1 parent 4c24142 commit 36167fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/error.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ bilingual_str TransactionErrorString(const TransactionError err)
2020
case TransactionError::P2P_DISABLED:
2121
return Untranslated("Peer-to-peer functionality missing or disabled");
2222
case TransactionError::MEMPOOL_REJECTED:
23-
return Untranslated("Transaction rejected by AcceptToMemoryPool");
23+
return Untranslated("Transaction rejected by mempool");
2424
case TransactionError::MEMPOOL_ERROR:
25-
return Untranslated("AcceptToMemoryPool failed");
25+
return Untranslated("Mempool internal error");
2626
case TransactionError::INVALID_PSBT:
2727
return Untranslated("PSBT is not well-formed");
2828
case TransactionError::PSBT_MISMATCH:

0 commit comments

Comments
 (0)