From c13ade3fbf92a32de4bde341b18e3283fa5ce56c Mon Sep 17 00:00:00 2001 From: zgfzgf <48779939+zgfzgf@users.noreply.github.com> Date: Mon, 23 Nov 2020 20:03:41 +0800 Subject: [PATCH] Downgrade duplicate nonce logs to debug (#4933) * add messagepool duplicate nonce print info * update log.Info to log.debug and go fmt * recover the grouping of imports * update print from info to debug * print format %w to %s --- chain/messagepool/messagepool.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index a507b60cfd6..806882a15f5 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -240,10 +240,13 @@ func (ms *msgSet) add(m *types.SignedMessage, mp *MessagePool, strict, untrusted // check if RBF passes minPrice := ComputeMinRBF(exms.Message.GasPremium) if types.BigCmp(m.Message.GasPremium, minPrice) >= 0 { - log.Infow("add with RBF", "oldpremium", exms.Message.GasPremium, + log.Debugw("add with RBF", "oldpremium", exms.Message.GasPremium, "newpremium", m.Message.GasPremium, "addr", m.Message.From, "nonce", m.Message.Nonce) } else { - log.Info("add with duplicate nonce") + log.Debugf("add with duplicate nonce. message from %s with nonce %d already in mpool,"+ + " increase GasPremium to %s from %s to trigger replace by fee: %s", + m.Message.From, m.Message.Nonce, minPrice, m.Message.GasPremium, + ErrRBFTooLowPremium) return false, xerrors.Errorf("message from %s with nonce %d already in mpool,"+ " increase GasPremium to %s from %s to trigger replace by fee: %w", m.Message.From, m.Message.Nonce, minPrice, m.Message.GasPremium,