rpc: Use mempool from node context instead of global#17564
rpc: Use mempool from node context instead of global#17564maflcko merged 3 commits intobitcoin:masterfrom
Conversation
faef91b to
fa366b2
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Concept ACK |
fa366b2 to
fa963d3
Compare
|
Concept ACK |
ryanofsky
left a comment
There was a problem hiding this comment.
Code review ACK fa963d3818afea82061615b9939361444e5b5c2d
fa963d3 to
fa7c501
Compare
ryanofsky
left a comment
There was a problem hiding this comment.
Code review ACK fa7c5017a9056b33e230d78f7ff6879e3d8941a5. Only change since last review is suggested rpc test simplification
jnewbery
left a comment
There was a problem hiding this comment.
Concept ACK and approach ACK.
There are a few places where I think the new code is less clear than existing code, which I think could be improved.
src/rpc/blockchain.cpp
Outdated
There was a problem hiding this comment.
I think in a future where running without a mempool is possible, we could make this friendlier by just defaulting include_mempool to false for nodes without mempools rather than forcing the user to always pass false as an argument.
(no change needed for this PR but something to add when -nomempool is added as an option)
fa7c501 to
fa71de7
Compare
Currently they are identical, but in the future we might want to turn the mempool into a unique_ptr. Replacing the global with the mempool pointer from the node context simplifies this step.
fa0ae3b to
fac3589
Compare
fac3589 to
faaa239
Compare
|
ACK faaa239 -- diff looks correct Thanks for doing this! |
Ah, you're right. I was confused because the name suggests that it ensures the return value is valid, and the other version of I've implemented a version of Russ's suggested changes here: jnewbery@d27fb22. What do you think, @MarcoFalke ? |
faaa239 to
fa8e650
Compare
|
Fixed up and force pushed commit by @jnewbery with suggested rename |
|
Code review ACK fa8e650 |
fa8e650 rest: Use mempool from node context instead of global (MarcoFalke) fa660d6 node: Use mempool from node context instead of global (MarcoFalke) facbaf0 rpc: Use mempool from node context instead of global (MarcoFalke) Pull request description: Currently they are identical, but in the future we might want to turn the mempool into a unique_ptr. Replacing the global with the mempool pointer from the node context simplifies this step. ACKs for top commit: jnewbery: Code review ACK fa8e650 ryanofsky: Code review ACK fa8e650, Only the discussed REST server changes since the last review. Tree-SHA512: 0836f3f39cf90306455962918446e5f8612e88c32072b92afc30929aea1f17430bbda0e2b3668d36c9d6b97d63a93cf4903185194571108642b7bf5a39b89125
…obal fa8e650 rest: Use mempool from node context instead of global (MarcoFalke) fa660d6 node: Use mempool from node context instead of global (MarcoFalke) facbaf0 rpc: Use mempool from node context instead of global (MarcoFalke) Pull request description: Currently they are identical, but in the future we might want to turn the mempool into a unique_ptr. Replacing the global with the mempool pointer from the node context simplifies this step. ACKs for top commit: jnewbery: Code review ACK fa8e650 ryanofsky: Code review ACK fa8e650, Only the discussed REST server changes since the last review. Tree-SHA512: 0836f3f39cf90306455962918446e5f8612e88c32072b92afc30929aea1f17430bbda0e2b3668d36c9d6b97d63a93cf4903185194571108642b7bf5a39b89125
Summary:
fa8e650b525e9493bdfa393c0c3e34cb22c78c08 rest: Use mempool from node context instead of global (MarcoFalke)
fa660d65d7cc401ad5bbfdc076a074de19a79329 node: Use mempool from node context instead of global (MarcoFalke)
facbaf092f1ab298943206603cff6e6e3d30d452 rpc: Use mempool from node context instead of global (MarcoFalke)
Pull request description:
Currently they are identical, but in the future we might want to turn
the mempool into a unique_ptr. Replacing the global with the mempool
pointer from the node context simplifies this step.
ACKs for top commit:
jnewbery:
Code review ACK fa8e650b5
ryanofsky:
Code review ACK fa8e650b525e9493bdfa393c0c3e34cb22c78c08, Only the discussed REST server changes since the last review.
Backport of Core [[bitcoin/bitcoin#17564 | PR17564]]
Depends on D7965
Test Plan:
ninja check check-functional
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D7966
…obal fa8e650 rest: Use mempool from node context instead of global (MarcoFalke) fa660d6 node: Use mempool from node context instead of global (MarcoFalke) facbaf0 rpc: Use mempool from node context instead of global (MarcoFalke) Pull request description: Currently they are identical, but in the future we might want to turn the mempool into a unique_ptr. Replacing the global with the mempool pointer from the node context simplifies this step. ACKs for top commit: jnewbery: Code review ACK fa8e650 ryanofsky: Code review ACK fa8e650, Only the discussed REST server changes since the last review. Tree-SHA512: 0836f3f39cf90306455962918446e5f8612e88c32072b92afc30929aea1f17430bbda0e2b3668d36c9d6b97d63a93cf4903185194571108642b7bf5a39b89125
Currently they are identical, but in the future we might want to turn
the mempool into a unique_ptr. Replacing the global with the mempool
pointer from the node context simplifies this step.