diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index 3538fc6ec..c02ea3712 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -117,12 +117,14 @@ func (ms *msgSet) add(m *types.SignedMessage) error { minPrice := exms.Message.GasPrice minPrice = types.BigAdd(minPrice, types.BigDiv(types.BigMul(minPrice, rbfNum), rbfDenom)) minPrice = types.BigAdd(minPrice, types.NewInt(1)) - if types.BigCmp(m.Message.GasPrice, minPrice) > 0 { + if types.BigCmp(m.Message.GasPrice, minPrice) >= 0 { log.Infow("add with RBF", "oldprice", exms.Message.GasPrice, "newprice", m.Message.GasPrice, "addr", m.Message.From, "nonce", m.Message.Nonce) } else { log.Info("add with duplicate nonce") - return xerrors.Errorf("message to %s with nonce %d already in mpool", m.Message.To, m.Message.Nonce) + return xerrors.Errorf("message from %s with nonce %d already in mpool,"+ + " increase GasPrice to %s from %s to trigger replace by fee", + m.Message.From, m.Message.Nonce, minPrice, m.Message.GasPrice) } } }