good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 855e9220 authored by Alex Sharov's avatar Alex Sharov Committed by GitHub
Browse files

print better log (#2358)

parent 33651512
No related branches found
No related tags found
No related merge requests found
......@@ -321,6 +321,9 @@ func (cs *ControlServerImpl) newBlockHashes66(ctx context.Context, req *proto_se
}
if _, err = sentry.SendMessageById(ctx, &outreq, &grpc.EmptyCallOption{}); err != nil {
if isPeerNotFoundErr(err) {
continue
}
return fmt.Errorf("send header request: %v", err)
}
}
......@@ -360,6 +363,9 @@ func (cs *ControlServerImpl) newBlockHashes65(ctx context.Context, req *proto_se
}
if _, err = sentry.SendMessageById(ctx, &outreq, &grpc.EmptyCallOption{}); err != nil {
if isPeerNotFoundErr(err) {
continue
}
return fmt.Errorf("send header request: %v", err)
}
}
......@@ -705,6 +711,9 @@ func (cs *ControlServerImpl) getBlockBodies66(ctx context.Context, inreq *proto_
}
_, err = sentry.SendMessageById(ctx, &outreq, &grpc.EmptyCallOption{})
if err != nil {
if isPeerNotFoundErr(err) {
return nil
}
return fmt.Errorf("send bodies response: %v", err)
}
//log.Info(fmt.Sprintf("[%s] GetBlockBodiesMsg responseLen %d", string(gointerfaces.ConvertH512ToBytes(inreq.PeerId)), len(b)))
......@@ -736,6 +745,9 @@ func (cs *ControlServerImpl) getBlockBodies65(ctx context.Context, inreq *proto_
}
_, err = sentry.SendMessageById(ctx, &outreq, &grpc.EmptyCallOption{})
if err != nil {
if isPeerNotFoundErr(err) {
return nil
}
return fmt.Errorf("send bodies response: %v", err)
}
//log.Info(fmt.Sprintf("[%s] GetBlockBodiesMsg responseLen %d", string(gointerfaces.ConvertH512ToBytes(inreq.PeerId)), len(b)))
......@@ -773,6 +785,9 @@ func (cs *ControlServerImpl) getReceipts66(ctx context.Context, inreq *proto_sen
}
_, err = sentry.SendMessageById(ctx, &outreq, &grpc.EmptyCallOption{})
if err != nil {
if isPeerNotFoundErr(err) {
return nil
}
return fmt.Errorf("send bodies response: %v", err)
}
//log.Info(fmt.Sprintf("[%s] GetReceipts responseLen %d", string(gointerfaces.ConvertH512ToBytes(inreq.PeerId)), len(b)))
......@@ -807,6 +822,9 @@ func (cs *ControlServerImpl) getReceipts65(ctx context.Context, inreq *proto_sen
}
_, err = sentry.SendMessageById(ctx, &outreq, &grpc.EmptyCallOption{})
if err != nil {
if isPeerNotFoundErr(err) {
return nil
}
return fmt.Errorf("send bodies response: %v", err)
}
//log.Info(fmt.Sprintf("[%s] GetReceipts responseLen %d", string(gointerfaces.ConvertH512ToBytes(inreq.PeerId)), len(b)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment