From c64eb088f61d49159fd832621a5c28054b2cf9b0 Mon Sep 17 00:00:00 2001 From: ziggie Date: Fri, 27 Oct 2023 14:06:51 +0200 Subject: [PATCH] chain: update error for getrawtransaction. The error needs to be less verbose to catch more cases where bitcoind does not find the transaction in its mempool. --- chain/mempool.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chain/mempool.go b/chain/mempool.go index 0b2125e78d..db6cd67f70 100644 --- a/chain/mempool.go +++ b/chain/mempool.go @@ -15,7 +15,8 @@ import ( const ( // txNotFoundErr is an error returned from bitcoind's // `getrawtransaction` RPC when the requested txid cannot be found. - txNotFoundErr = "-5: No such mempool or blockchain transaction" + // https://github.com/bitcoin/bitcoin/blob/fa05a726c225dc65dee79367bb67f099ae4f99e6/src/rpc/rawtransaction.cpp#L366 + txNotFoundErr = "-5: No such mempool" // DefaultGetRawTxBatchSize specifies the default number of requests to // be batched before sending them to the bitcoind client.