diff options
author | Anthony Towns <aj@erisian.com.au> | 2023-09-07 19:16:57 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2023-11-14 08:45:30 +1000 |
commit | 6e9e4e6130797b721c8df1eabaf46ec25ebb6abe (patch) | |
tree | 6444c337cd23d1e6aabedf229a9efb1583fb7351 /src/rpc/server.h | |
parent | 5800c558eb5efb4839ed00d6967e43306d68e1c3 (diff) | |
download | bitcoin-6e9e4e6130797b721c8df1eabaf46ec25ebb6abe.tar.xz |
Use ParamsWrapper for witness serialization
Diffstat (limited to 'src/rpc/server.h')
-rw-r--r-- | src/rpc/server.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rpc/server.h b/src/rpc/server.h index 24658ddb8b..9a49d82570 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -183,7 +183,14 @@ void InterruptRPC(); void StopRPC(); std::string JSONRPCExecBatch(const JSONRPCRequest& jreq, const UniValue& vReq); -// Retrieves any serialization flags requested in command line argument -int RPCSerializationFlags(); +// Drop witness when serializing for RPC? +bool RPCSerializationWithoutWitness(); + +template<typename T> +auto RPCTxSerParams(T&& t) +{ + if (RPCSerializationWithoutWitness()) return TX_NO_WITNESS(t); + return TX_WITH_WITNESS(t); +} #endif // BITCOIN_RPC_SERVER_H |