Merge pull request #799 from filecoin-project/fix/mpool-sub

Fix mpool sub not unsubbing
This commit is contained in:
Jakub Sztandera 2019-12-08 23:29:51 +01:00 committed by GitHub
commit aa1cef008f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,6 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain"
"github.com/filecoin-project/lotus/chain/address" "github.com/filecoin-project/lotus/chain/address"
"github.com/filecoin-project/lotus/chain/stmgr" "github.com/filecoin-project/lotus/chain/stmgr"
"github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/store"
@ -644,7 +643,7 @@ func (mp *MessagePool) Updates(ctx context.Context) (<-chan api.MpoolUpdate, err
sub := mp.changes.Sub(localUpdates) sub := mp.changes.Sub(localUpdates)
go func() { go func() {
defer mp.changes.Unsub(sub, chain.LocalIncoming) defer mp.changes.Unsub(sub, localUpdates)
for { for {
select { select {