diff --git a/src/messages/block.cpp b/src/messages/block.cpp index c3668f87d..5a69cf9e0 100644 --- a/src/messages/block.cpp +++ b/src/messages/block.cpp @@ -55,12 +55,11 @@ typename block::cptr block::deserialize(uint32_t version, { // TODO: consider having tx cache serialized sizes. const auto true_size = tx->serialized_size(true); - ////tx->set_witness_hash(bitcoin_hash(true_size, begin)); + tx->set_witness_hash(bitcoin_hash(true_size, begin)); // If segregated the hashes are distinct, cache both. if (tx->is_segregated()) { - // Coinbase witness hash is null_hash, do not cache. if (!coinbase) { const auto end = std::next(begin, tx->serialized_size(false)); @@ -69,7 +68,6 @@ typename block::cptr block::deserialize(uint32_t version, } else { - // Avoiding witness hash caching for now. tx->set_hash(bitcoin_hash(true_size, begin)); } diff --git a/src/messages/transaction.cpp b/src/messages/transaction.cpp index bc6f86095..ff138e711 100644 --- a/src/messages/transaction.cpp +++ b/src/messages/transaction.cpp @@ -63,7 +63,7 @@ typename transaction::cptr transaction::deserialize(uint32_t version, return nullptr; const auto& tx = *message->transaction_ptr; - ////tx.set_witness_hash(bitcoin_hash(data)); + tx.set_witness_hash(bitcoin_hash(data)); // If segregated the hashes are distinct, cache both. if (tx.is_segregated()) @@ -74,7 +74,6 @@ typename transaction::cptr transaction::deserialize(uint32_t version, } else { - // Avoiding witness hash caching for now. tx.set_hash(bitcoin_hash(data)); }