Skip to content

Commit

Permalink
Merge pull request btcsuite#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 and buck54321 committed Apr 21, 2024
1 parent a1d6461 commit 687d078
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 @@ -14,7 +14,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 @@ -410,7 +410,9 @@ func (m *mempool) getRawTxIgnoreErr(txid *chainhash.Hash) *ltcutil.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 687d078

Please sign in to comment.