Merge pull request #2641 from filecoin-project/feat/repub-less
only republish the next few messages from your mempool
This commit is contained in:
commit
b60f2deedb
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user