Merge pull request #1096 from filecoin-project/fix/msgset-add-error

Add missing fields to duplicate message error
This commit is contained in:
Whyrusleeping 2020-01-17 16:22:20 -08:00 committed by GitHub
commit 3962d4204b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ func (ms *msgSet) add(m *types.SignedMessage) error {
if _, has := ms.msgs[m.Message.Nonce]; has { if _, has := ms.msgs[m.Message.Nonce]; has {
if m.Cid() != ms.msgs[m.Message.Nonce].Cid() { if m.Cid() != ms.msgs[m.Message.Nonce].Cid() {
log.Error("Add with duplicate nonce") log.Error("Add with duplicate nonce")
return xerrors.Errorf("message to %s with nonce %d already in mpool") return xerrors.Errorf("message to %s with nonce %d already in mpool", m.Message.To, m.Message.Nonce)
} }
} }
ms.msgs[m.Message.Nonce] = m ms.msgs[m.Message.Nonce] = m