aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r--src/rpc/blockchain.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index be6a8c47fd..931a741f53 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -189,7 +189,7 @@ UniValue blockToJSON(BlockManager& blockman, const CBlock& block, const CBlockIn
// coinbase transaction (i.e. i == 0) doesn't have undo data
const CTxUndo* txundo = (have_undo && i > 0) ? &blockUndo.vtxundo.at(i - 1) : nullptr;
UniValue objTx(UniValue::VOBJ);
- TxToUniv(*tx, /*block_hash=*/uint256(), /*entry=*/objTx, /*include_hex=*/true, /*without_witness=*/RPCSerializationWithoutWitness(), txundo, verbosity);
+ TxToUniv(*tx, /*block_hash=*/uint256(), /*entry=*/objTx, /*include_hex=*/true, txundo, verbosity);
txs.push_back(objTx);
}
break;
@@ -738,10 +738,9 @@ static RPCHelpMan getblock()
const CBlock block{GetBlockChecked(chainman.m_blockman, pblockindex)};
- if (verbosity <= 0)
- {
+ if (verbosity <= 0) {
DataStream ssBlock;
- ssBlock << RPCTxSerParams(block);
+ ssBlock << TX_WITH_WITNESS(block);
std::string strHex = HexStr(ssBlock);
return strHex;
}