Skip to content

Commit

Permalink
Merge pull request #882 from yyforyongyu/fix-typo
Browse files Browse the repository at this point in the history
chain: fix error match typo
  • Loading branch information
Roasbeef authored Jul 18, 2023
2 parents 037580c + 3930388 commit 23eda3c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chain/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

// txNotFoundErr is an error returned from bitcoind's `getrawtransaction` RPC
// when the requested txid cannot be found.
const txNotFoundErr = "-5: No such mempool or blockchain Transaction"
const txNotFoundErr = "-5: No such mempool or blockchain transaction"

// cachedInputs caches the inputs of the transactions in the mempool. This is
// used to provide fast lookup between txids and inputs.
Expand Down Expand Up @@ -413,7 +413,9 @@ func (m *mempool) getRawTxIgnoreErr(txid *chainhash.Hash) *btcutil.Tx {
}

// If this is the txNotFoundErr, we'll create a debug log.
if strings.Contains(err.Error(), txNotFoundErr) {
errStr := strings.ToLower(err.Error())
errExp := strings.ToLower(txNotFoundErr)
if strings.Contains(errStr, errExp) {
log.Debugf("unable to fetch transaction %s from mempool: %v",
txid, err)

Expand Down

0 comments on commit 23eda3c

Please sign in to comment.