In commit “rpc: call TestBlockValidity via miner interface” (d8a3496b5ad27bea4c79ea0344f595cc1b95f0d3)
Not important, but it might be good to move the state
output parameter last. The reason would be to work with the libmultiprocess code generator in case we want to expose this interface over IPC. The code generator only knows how to parse Cap’n Proto declarations, not C++ code, so when it encounters a Cap’n Proto method declaration with output parameters like:
0testBlockValidity [@1](/bitcoin-bitcoin/contributor/1/) (block: Data, maxTxFee :Bool) -> (state: ValidationState, result :Bool);
it just assumes a corresponding C++ method exists with the listed input parameters first and output parameters last.
(Also I just noticed information about output parameters was changed in the developer notes. Suggestion to put output parameters last used used to be mentioned in the “internal interface” style section, but it looks like commit e66b321fd1ddfffd9bfc59d407ad8f03490b873c from #25092 turned that advice into a bigger, broader rule, which I’m not sure is a great change..)