-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Avoid permanent cs_main lock in getblockheader #12153
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
Conversation
3062a36 to
d22e406
Compare
7bb7175 to
5e924f4
Compare
ryanofsky
left a comment
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.
utACK last commit only 5e924f4d22a16b0c46d4c6cb19877892331d41fa (previous commits are from base PR)
|
needs rebase (but probably not worth doing until #12151 is merged) |
e167a84 to
ba2dad1
Compare
ba2dad1 to
4572a39
Compare
|
Rebased. |
4572a39 to
f12e1d0
Compare
|
utACK f12e1d0 |
ryanofsky
left a comment
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.
utACK f12e1d0. No change since last review other than rebase.
|
So to be clear: this is can be done, because it is safe to access the fields on the CBlockIndex instance without the lock? |
|
@laanwj to best of my knowledge yes. Looks like |
|
utACK f12e1d0. Do you intend to do the same for |
f12e1d0 rpc: Avoid permanent cs_main lock in getblockheader (João Barbosa) Pull request description: This PR reduces the `cs_main` lock scope in `getblockheader` RPC. Tree-SHA512: bc51f80e15d1b32d3c7886836457f9929706b6aad9841dafce31ffca444281471b21b56192bb50de774184b9377412f815ad8d3d2439049a7e64d2e59c415767
zcash: cherry picked from commit f12e1d0 zcash: bitcoin/bitcoin#12153
zcash: cherry picked from commit f12e1d0 zcash: bitcoin/bitcoin#12153
f12e1d0 rpc: Avoid permanent cs_main lock in getblockheader (João Barbosa) Pull request description: This PR reduces the `cs_main` lock scope in `getblockheader` RPC. Tree-SHA512: bc51f80e15d1b32d3c7886836457f9929706b6aad9841dafce31ffca444281471b21b56192bb50de774184b9377412f815ad8d3d2439049a7e64d2e59c415767
f12e1d0 rpc: Avoid permanent cs_main lock in getblockheader (João Barbosa) Pull request description: This PR reduces the `cs_main` lock scope in `getblockheader` RPC. Tree-SHA512: bc51f80e15d1b32d3c7886836457f9929706b6aad9841dafce31ffca444281471b21b56192bb50de774184b9377412f815ad8d3d2439049a7e64d2e59c415767
This PR reduces the
cs_mainlock scope ingetblockheaderRPC.