-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fixed ban bug that doesn't print numTxns #1900
Conversation
(cherry picked from commit 11c8d11)
Good catch. Just waiting for tests to run then I'll review. |
Pull Request Test Coverage Report for Build 3219535761
💛 - Coveralls |
@l0k18 looks like a test fails. Could you check that out? |
https://github.com/Indra-Labs/btcd/commits/tx-not-found-error-bug Literally only changes one variable name specified in the error print. This test failure is not my work. |
https://github.com/btcsuite/btcd/actions/runs/3219535761/jobs/5265307632 I don't see how this change would have affected this test but if so, the test is wrong. The failing test passes on my system. https://github.com/btcsuite/btcd/blob/master/addrmgr/addrmanager_internal_test.go#L171 is the code location that produces this test fail causing error. Not sure how this slipped through previously but that looks like a race condition to me, somewhere else this I have not looked deeply at the relevant code but in my experience, very often it's only one or two values that need to be locked and atomics are more bug resistant than mutexes. |
Well, looks like it was one of the random failures we see with GH Actions occasionally (still better than travis though). Sorry for the extra trouble there. |
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.
OK
I am pretty sure there is a race in this bug. I'd put a note on it to check. If that variable is accessed anywhere else without the mutex locked this could cause it. |
This is a typo fix. There is an underlying ban bug related to this that causes two btcd nodes to ban each other due to "transaction not found" errors.