diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index b2ed89cc4..f6c8e3ac9 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -426,18 +426,18 @@ func New(api Provider, ds dtypes.MetadataDS, netName dtypes.NetworkName, j journ return mp, nil } -func (mp *MessagePool) ProtectMessages(protect func(cid.Cid) error) error { +func (mp *MessagePool) ForEachPendingMessage(f func(cid.Cid) error) error { mp.lk.Lock() defer mp.lk.Unlock() for _, mset := range mp.pending { for _, m := range mset.msgs { - err := protect(m.Cid()) + err := f(m.Cid()) if err != nil { return err } - err = protect(m.Message.Cid()) + err = f(m.Message.Cid()) if err != nil { return err } diff --git a/node/modules/chain.go b/node/modules/chain.go index e81b2e5b7..c4017b8c0 100644 --- a/node/modules/chain.go +++ b/node/modules/chain.go @@ -68,7 +68,7 @@ func MessagePool(lc fx.Lifecycle, mpp messagepool.Provider, ds dtypes.MetadataDS return mp.Close() }, }) - protector.AddProtector(mp.ProtectMessages) + protector.AddProtector(mp.ForEachPendingMessage) return mp, nil }