Browse Source

router/statesync: add helpful log messages (#6724)

pull/6731/head
Callum Waters 3 years ago
committed by GitHub
parent
commit
6dd0cf92c8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions
  1. +9
    -0
      internal/p2p/router.go
  2. +2
    -1
      internal/statesync/reactor.go
  3. +0
    -3
      test/e2e/runner/main.go

+ 9
- 0
internal/p2p/router.go View File

@ -1023,6 +1023,15 @@ func (r *Router) NodeInfo() types.NodeInfo {
// OnStart implements service.Service.
func (r *Router) OnStart() error {
netAddr, _ := r.nodeInfo.NetAddress()
r.Logger.Info(
"starting router",
"node_id", r.nodeInfo.NodeID,
"channels", r.nodeInfo.Channels,
"listen_addr", r.nodeInfo.ListenAddr,
"net_addr", netAddr,
)
go r.dialPeers()
go r.evictPeers()


+ 2
- 1
internal/statesync/reactor.go View File

@ -460,10 +460,11 @@ func (r *Reactor) handleSnapshotMessage(envelope p2p.Envelope) error {
}
for _, snapshot := range snapshots {
logger.Debug(
logger.Info(
"advertising snapshot",
"height", snapshot.Height,
"format", snapshot.Format,
"peer", envelope.From,
)
r.snapshotCh.Out <- p2p.Envelope{
To: envelope.From,


+ 0
- 3
test/e2e/runner/main.go View File

@ -276,9 +276,6 @@ Does not run any perbutations.
defer loadCancel()
go func() {
err := Load(ctx, cli.testnet, 1)
if err != nil {
logger.Error(fmt.Sprintf("Transaction load failed: %v", err.Error()))
}
chLoadResult <- err
}()


Loading…
Cancel
Save