chainwatch: sub to mpool/blocks afetr initial sync
This commit is contained in:
parent
2e9655a4e0
commit
97cf3f70a5
@ -82,8 +82,6 @@ var runCmd = &cli.Command{
|
|||||||
defer st.close()
|
defer st.close()
|
||||||
|
|
||||||
runSyncer(ctx, api, st)
|
runSyncer(ctx, api, st)
|
||||||
go subMpool(ctx, api, st)
|
|
||||||
go subBlocks(ctx, api, st)
|
|
||||||
|
|
||||||
h, err := newHandler(api, st)
|
h, err := newHandler(api, st)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -32,6 +32,12 @@ func runSyncer(ctx context.Context, api api.FullNode, st *storage) {
|
|||||||
case store.HCRevert:
|
case store.HCRevert:
|
||||||
log.Warnf("revert todo")
|
log.Warnf("revert todo")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if change.Type == store.HCCurrent {
|
||||||
|
go subMpool(ctx, api, st)
|
||||||
|
go subBlocks(ctx, api, st)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user