bitcoin/src/rpc
MarcoFalke 8e1913ae02
Merge #21062: refactor: return MempoolAcceptResult from ATMP
53e716ea11 [refactor] improve style for touched code (gzhao408)
174cb5330a [refactor] const ATMPArgs and non-const Workspace (gzhao408)
f82baf0762 [refactor] return MempoolAcceptResult (gzhao408)
9db10a5506 [refactor] clean up logic in testmempoolaccept (gzhao408)

Pull request description:

  This is the first 4 commits of #20833, and does refactoring only. It should be relatively simple to review, and offers a few nice things:
  - It makes accessing values that don't make sense (e.g. fee) when the tx is invalid an error.
  - Returning `MempoolAcceptResult` from ATMP makes the interface cleaner. The caller can get a const instead of passing in a mutable "out" param.
  - We don't have to be iterating through a bunch of lists for package validation, we can just return a `std::vector<MempoolAcceptResult>`.
  - We don't have to refactor all ATMP call sites again if/when we want to return more stuff from it.

ACKs for top commit:
  MarcoFalke:
    ACK 53e716ea11 💿
  jnewbery:
    Code review ACK 53e716ea11
  ariard:
    Code Review ACK 53e716e, I did tweak a bit the touched paths to see if we had good test coverage. Didn't find holes.

Tree-SHA512: fa6ec324a08ad9e6e55948615cda324cba176255708bf0a0a0f37cedb7a75311aa334ac6f223be7d8df3c7379502b1081102b9589f9a9afa1713ad3d9ab3c24f
2021-02-11 14:45:41 +01:00
..
blockchain.cpp Merge #21114: Deduplicate some block-to-JSON code 2021-02-10 14:49:44 +01:00
blockchain.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
client.cpp rpc: [refactor] Use concise C++11 code in CRPCConvertTable constructor 2021-01-28 08:16:31 +01:00
client.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
mining.cpp Merge #20749: [Bundle 1/n] Prune g_chainman usage related to ::LookupBlockIndex 2021-02-01 13:09:46 +01:00
mining.h rpc: create rpc/mining.h, hoist default max tries values to constant 2020-06-01 15:08:36 +02:00
misc.cpp util: Disallow negative mocktime 2021-02-02 08:43:19 +00:00
net.cpp rpc: Remove duplicate name and argNames from CRPCCommand 2021-01-28 08:19:52 +01:00
protocol.h rpc: Add specific error code for "wallet already loaded" 2021-01-25 07:55:35 +01:00
rawtransaction.cpp [refactor] return MempoolAcceptResult 2021-02-09 07:01:52 -08:00
rawtransaction_util.cpp Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const 2020-12-06 00:22:40 +00:00
rawtransaction_util.h Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const 2020-12-06 00:22:40 +00:00
register.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
request.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
request.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
server.cpp rpc: Remove duplicate name and argNames from CRPCCommand 2021-01-28 08:19:52 +01:00
server.h rpc: Remove duplicate name and argNames from CRPCCommand 2021-01-28 08:19:52 +01:00
util.cpp rpc: Use RPCHelpMan for check-rpc-mappings linter 2021-01-28 08:16:34 +01:00
util.h rpc: Use RPCHelpMan for check-rpc-mappings linter 2021-01-28 08:16:34 +01:00