This change was motivated by #32592 (review)
It does exactly what is said in the comment. Reducing the scope of the lock by a bit before it is needed
This change was motivated by #32592 (review)
It does exactly what is said in the comment. Reducing the scope of the lock by a bit before it is needed
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33264.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | stickies-v, maflcko |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
lgtm ACK 06ec4809045f5cbe51d54e8eda08db03ca4d5ca1
731 | @@ -734,6 +732,7 @@ static RPCHelpMan getblocktemplate() 732 | if (!DecodeHexBlk(block, dataval.get_str())) 733 | throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed"); 734 | 735 | + LOCK(cs_main);
nit: could be one line lower to reduce scope more
Makes sense to me! updated in 493ba0f
ACK 06ec4809045f5cbe51d54e8eda08db03ca4d5ca1
re-ACK 493ba0f688311280056491986068cd4a9ad2be66
lgtm ACK 493ba0f688311280056491986068cd4a9ad2be66