chainwatch: sub to mpool/blocks afetr initial sync

This commit is contained in:
Łukasz Magiera 2019-12-13 15:47:51 +01:00
parent 2e9655a4e0
commit 97cf3f70a5
2 changed files with 6 additions and 2 deletions

View File

@ -82,8 +82,6 @@ var runCmd = &cli.Command{
defer st.close()
runSyncer(ctx, api, st)
go subMpool(ctx, api, st)
go subBlocks(ctx, api, st)
h, err := newHandler(api, st)
if err != nil {

View File

@ -32,6 +32,12 @@ func runSyncer(ctx context.Context, api api.FullNode, st *storage) {
case store.HCRevert:
log.Warnf("revert todo")
}
if change.Type == store.HCCurrent {
go subMpool(ctx, api, st)
go subBlocks(ctx, api, st)
}
}
}
}()