dont publish nil message removed

This commit is contained in:
whyrusleeping 2019-11-19 15:26:25 -06:00 committed by Łukasz Magiera
parent 06d498b45b
commit 71923c691d
2 changed files with 7 additions and 4 deletions

View File

@ -316,10 +316,12 @@ func (mp *MessagePool) Remove(from address.Address, nonce uint64) {
return return
} }
mp.changes.Pub(api.MpoolUpdate{ if m, ok := mset.msgs[nonce]; ok {
Type: api.MpoolRemove, mp.changes.Pub(api.MpoolUpdate{
Message: mset.msgs[nonce], Type: api.MpoolRemove,
}, localUpdates) Message: m,
}, localUpdates)
}
// NB: This deletes any message with the given nonce. This makes sense // NB: This deletes any message with the given nonce. This makes sense
// as two messages with the same sender cannot have the same nonce // as two messages with the same sender cannot have the same nonce

View File

@ -2,6 +2,7 @@ package main
import ( import (
"context" "context"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"