Skip to content
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

[BUG][Wallet] Lock cs_main before accessing CheckFinalTx #1948

Merged

Conversation

random-zebra
Copy link

@random-zebra random-zebra commented Oct 29, 2020

Bug introduced in #1698 .
The LockHeld assertion in CheckFinalTx fails when it is called from GetMasternodeVinAndKeys (via CheckTXAvailability).

This PR adds an assertion to the functions calling CheckFinalTx

  • removeForReorg
  • CheckTXAvailability

And acquires cs_main mutex in GetMasternodeVinAndKeys.

Add AssertLockHeld in functions calling `CheckFinalTx`:
- `removeForReorg`
- `CheckTXAvailability`

And add aquire cs_main mutex in `GetMasternodeVinAndKeys` (calling
`CheckTXAvailability`)
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

good catch, utACK dfa9928

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

utACK dfa9928

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

Successfully merging this pull request may close these issues.

3 participants