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

RPC: Remove cs_main lock from blockToJSON, blockHeaderToJSON and TxToJSON #2732

Merged
merged 2 commits into from
Feb 3, 2022

Conversation

random-zebra
Copy link

Follow-up to #2728.
This pull makes blockToJSON, blockheaderToJSON, and TxToJSON free of cs_main locks by passing the chainTip and using GetAncestor to check if a block is part of the active chain (as per bitcoin#12151).

@random-zebra random-zebra added this to the 6.0.0 milestone Jan 24, 2022
@random-zebra random-zebra self-assigned this Jan 24, 2022
@random-zebra random-zebra force-pushed the 202201_blockToJSON branch 2 times, most recently from 60ab6f1 to ac391cd Compare January 25, 2022 14:42
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.

a few minor static analysis nits, otherwise functional ACK

src/rest.cpp Outdated Show resolved Hide resolved
src/rest.cpp Outdated Show resolved Hide resolved
src/rest.cpp Outdated Show resolved Hide resolved
@random-zebra
Copy link
Author

Removed nullptr initializer values.

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.

ACK 5e0d308

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.

utACK 5e0d308 and merging..

@furszy furszy merged commit 7216dc9 into PIVX-Project:master Feb 3, 2022
@Fuzzbawls Fuzzbawls modified the milestones: 6.0.0, 5.5.0 Sep 11, 2022
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.

4 participants