dont publish nil message removed
This commit is contained in:
parent
06d498b45b
commit
71923c691d
@ -316,10 +316,12 @@ func (mp *MessagePool) Remove(from address.Address, nonce uint64) {
|
||||
return
|
||||
}
|
||||
|
||||
mp.changes.Pub(api.MpoolUpdate{
|
||||
Type: api.MpoolRemove,
|
||||
Message: mset.msgs[nonce],
|
||||
}, localUpdates)
|
||||
if m, ok := mset.msgs[nonce]; ok {
|
||||
mp.changes.Pub(api.MpoolUpdate{
|
||||
Type: api.MpoolRemove,
|
||||
Message: m,
|
||||
}, localUpdates)
|
||||
}
|
||||
|
||||
// NB: This deletes any message with the given nonce. This makes sense
|
||||
// as two messages with the same sender cannot have the same nonce
|
||||
|
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/ipfs/go-cid"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user