fix(chainwatch): Add important documentation
This commit is contained in:
parent
7290431cb0
commit
2b83089da8
@ -186,6 +186,10 @@ func (s *Syncer) Start(ctx context.Context) {
|
||||
for _, change := range notif {
|
||||
switch change.Type {
|
||||
case store.HCCurrent:
|
||||
// This case is important for capturing the initial state of a node
|
||||
// which might be on a dead network with no new blocks being produced.
|
||||
// It also allows a fresh Chainwatch instance to start walking the
|
||||
// chain without waiting for a new block to come along.
|
||||
fallthrough
|
||||
case store.HCApply:
|
||||
unsynced, err := s.unsyncedBlocks(ctx, change.Val, sinceEpoch)
|
||||
|
Loading…
Reference in New Issue
Block a user