Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jholdstock
Copy link
Member

No description provided.

Its nicer to have an explicit log for this case rather than "Mixed 0 of
0 selected outputs of account 2".
Comment on lines +489 to +490
case errors.Is(err, context.Canceled):
err = nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree with this change. The commit description says

"Don't log error when account mixer is canceled."

but we are logging at debug below.

This doesn't just suppress the log; it changes the return value.

The only other places we would be logging an error will be in other systems that call this wallet method (jsonrpc, grpc, and the auto ticketbuyer). We already suppress this error log in the autobuyer, and I don't think it makes sense to not return this error up to the rpc handlers (if they disconnect, they wouldn't receive the rpc error anyways).

w.lockedOutpointMu.Unlock()

if len(credits) == 0 {
log.Debugf("No outputs eligible for mixing")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd include the account in this message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants