diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index c02ea3712..b4ae32b97 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -40,6 +40,8 @@ const futureDebug = false const ReplaceByFeeRatio = 1.25 +const repubMsgLimit = 5 + var ( rbfNum = types.NewInt(uint64((ReplaceByFeeRatio - 1) * 256)) rbfDenom = types.NewInt(256) @@ -269,6 +271,10 @@ func (mp *MessagePool) repubLocal() { log.Infow("republishing local messages", "n", len(outputMsgs)) } + if len(outputMsgs) > repubMsgLimit { + outputMsgs = outputMsgs[:repubMsgLimit] + } + for _, msg := range outputMsgs { msgb, err := msg.Serialize() if err != nil {