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/index | |
parent | 5800c558eb5efb4839ed00d6967e43306d68e1c3 (diff) |
Use ParamsWrapper for witness serialization
Diffstat (limited to 'src/index')
-rw-r--r-- | src/index/txindex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index/txindex.cpp b/src/index/txindex.cpp index e16dd0f8bd..5d37fd0d8f 100644 --- a/src/index/txindex.cpp +++ b/src/index/txindex.cpp @@ -65,7 +65,7 @@ bool TxIndex::CustomAppend(const interfaces::BlockInfo& block) vPos.reserve(block.data->vtx.size()); for (const auto& tx : block.data->vtx) { vPos.emplace_back(tx->GetHash(), pos); - pos.nTxOffset += ::GetSerializeSize(*tx, CLIENT_VERSION); + pos.nTxOffset += ::GetSerializeSize(TX_WITH_WITNESS(*tx)); } return m_db->WriteTxs(vPos); } @@ -89,7 +89,7 @@ bool TxIndex::FindTx(const uint256& tx_hash, uint256& block_hash, CTransactionRe if (fseek(file.Get(), postx.nTxOffset, SEEK_CUR)) { return error("%s: fseek(...) failed", __func__); } - file >> tx; + file >> TX_WITH_WITNESS(tx); } catch (const std::exception& e) { return error("%s: Deserialize or I/O error - %s", __func__, e.what()); } |