diff options
author | fanquake <fanquake@gmail.com> | 2020-07-28 14:27:41 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-07-28 14:54:00 +0800 |
commit | a1da180b1b277a404b643791fbdd3bbcb9899623 (patch) | |
tree | 3f2a0ea0196b0abd8020496603305d04d55e610f /src/util | |
parent | b62fbf9e1c193464bca443076906b7ea47d56532 (diff) | |
parent | fa5979d12f8c65754e36cdddb9d032ab81fecc3a (diff) |
Merge #19589: rpc: Avoid useless mempool query in gettxoutproof
fa5979d12f8c65754e36cdddb9d032ab81fecc3a rpc: Avoid useless mempool query in gettxoutproof (MarcoFalke)
fa1f7f28cbc48675514a01c4ca773f1ba8ea836b rpc: Style fixups in gettxoutproof (MarcoFalke)
Pull request description:
`GetTransaction` implicitly and unconditionally asks the mempool global for a transaction. This is problematic for several reasons:
* `gettxoutproof` is for on-chain txs only and asking the mempool for on-chain txs is confusing and minimally wasteful
* Globals are confusing and make code harder to test with unit tests
Fix both issues by passing in an optional mempool. This also helps with #19556
ACKs for top commit:
hebasto:
re-ACK fa5979d12f8c65754e36cdddb9d032ab81fecc3a
jnewbery:
utACK fa5979d12f8c65754e36cdddb9d032ab81fecc3a
promag:
Code review ACK fa5979d12f8c65754e36cdddb9d032ab81fecc3a.
Tree-SHA512: 048361b82abfcc40481181bd44f70cfc9e97d5d6356549df34bbe30b9de7a0a72d2207a3ad0279b21f06293509b284d8967f58ca7e716263a22b20aa4e7f9c54
Diffstat (limited to 'src/util')
0 files changed, 0 insertions, 0 deletions