mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
Added more peer count logs (#6865)
This commit is contained in:
parent
cb6878cd7d
commit
7fb6d94a64
@ -17,10 +17,28 @@ func (l *LightClient) BootstrapCheckpoint(ctx context.Context, finalized [32]byt
|
||||
|
||||
logInterval := time.NewTicker(10 * time.Second)
|
||||
defer logInterval.Stop()
|
||||
|
||||
doneLogCh := make(chan struct{})
|
||||
var (
|
||||
b *cltypes.LightClientBootstrap
|
||||
err error
|
||||
)
|
||||
// Start log go routine.
|
||||
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
case <-logInterval.C:
|
||||
peers, err := l.rpc.Peers()
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
log.Info("[Checkpoint Sync] P2P", "peers", peers)
|
||||
case <-doneLogCh:
|
||||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
for b == nil {
|
||||
b, err = l.rpc.SendLightClientBootstrapReqV1(finalized)
|
||||
|
Loading…
Reference in New Issue
Block a user