-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
p2p receipts #11010
p2p receipts #11010
Changes from 1 commit
eea467a
9ff21c9
35a3f1f
f05ba60
28274e1
c917eb0
cf7fc0b
132d101
ddc0aae
7cf43ac
61ea076
894855e
c965d3f
f5740fe
9f1bb35
e879bd8
6072d54
8604911
490c1a8
0d23573
625a62c
d7c5fff
e25c4ec
ba044f6
74ab518
2107f89
6d3b7da
b632521
68b09d5
b2c0f15
0620327
7bd5c20
7626b76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,7 +177,7 @@ func (f *Fetch) receiveMessage(ctx context.Context, sentryClient sentry.SentryCl | |
var req *sentry.InboundMessage | ||
for req, err = stream.Recv(); ; req, err = stream.Recv() { | ||
if err != nil { | ||
f.logger.Error("[txpool.receiveMessage]", "err", err) | ||
f.logger.Debug("[txpool.receiveMessage]", "err", err) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also: I understand why need log error which we not return. But if we return - then it's job of caller to log it (otherwise we may log same thing multiple times). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. return wrapped error instead of logging |
||
select { | ||
case <-f.ctx.Done(): | ||
return ctx.Err() | ||
|
@@ -189,7 +189,6 @@ func (f *Fetch) receiveMessage(ctx context.Context, sentryClient sentry.SentryCl | |
f.logger.Warn("[txpool.receiveMessage]", "req nil") | ||
return nil | ||
} | ||
f.logger.Info("[txpool.receiveMessage]", "req", req) | ||
if err := f.handleInboundMessage(streamCtx, req, sentryClient); err != nil { | ||
if grpcutil.IsRetryLater(err) || grpcutil.IsEndOfStream(err) { | ||
time.Sleep(3 * time.Second) | ||
|
@@ -200,7 +199,6 @@ func (f *Fetch) receiveMessage(ctx context.Context, sentryClient sentry.SentryCl | |
if f.wg != nil { | ||
f.wg.Done() | ||
} | ||
f.logger.Info("[txpool.fetch] Handling incoming message", "msg", string(req.Data), "reqID", req.Id.String(), "err", err) | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no reason to log ctx cancelation.
for example if node shutting-down by Ctrl+C - it's not an error, but expected behavior.
let's move under
select
or let's useerrors.Is(context.Canceled)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return wrapped error instead of logging