Browse Source

mempool: remove duplicate tx message from reactor logs (#7795)

pull/7799/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
7885839b75
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      internal/mempool/reactor.go

+ 12
- 1
internal/mempool/reactor.go View File

@ -149,7 +149,18 @@ func (r *Reactor) handleMempoolMessage(ctx context.Context, envelope *p2p.Envelo
for _, tx := range protoTxs {
if err := r.mempool.CheckTx(ctx, types.Tx(tx), nil, txInfo); err != nil {
logger.Error("checktx failed for tx", "tx", fmt.Sprintf("%X", types.Tx(tx).Hash()), "err", err)
if errors.Is(err, types.ErrTxInCache) {
// if the tx is in the cache,
// then we've been gossiped a
// Tx that we've already
// got. Gossip should be
// smarter, but it's not a
// problem.
continue
}
logger.Error("checktx failed for tx",
"tx", fmt.Sprintf("%X", types.Tx(tx).Hash()),
"err", err)
}
}


Loading…
Cancel
Save