Skip to content

Commit

Permalink
refuse to add duplicates in the mpool
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Sep 3, 2020
1 parent a4c6503 commit d20b6ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chain/messagepool/messagepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ func (ms *msgSet) add(m *types.SignedMessage, mp *MessagePool, strict bool) (boo
m.Message.From, m.Message.Nonce, minPrice, m.Message.GasPremium,
ErrRBFTooLowPremium)
}
} else {
return false, xerrors.Errorf("message from %s with nonce %d already in mpool: %w",
m.Message.From, m.Message.Nonce, ErrSoftValidationFailure)
}

ms.requiredFunds.Sub(ms.requiredFunds, exms.Message.RequiredFunds().Int)
Expand Down

0 comments on commit d20b6ad

Please sign in to comment.