Segwit: Rename CTransaction::GetWitnessHash() -> CTransaction::GetHashWithWitness()

The upstream name of GetWitnessHash() is very confusing as it is not a hash of the witness data for the transaction, but rather a hash of the full serialization of the transaction including witness data. This goes beyond confusing to downright wrong with CT/CA where the witness hash will be a hash tree of witness data (rangeproofs, surjectionproofs, script signatures, etc.) and NOT have any transaction data.
This commit is contained in:
Mark Friedenbach 2017-03-11 14:20:27 -08:00 committed by Gregory Sanders
parent d3f60513d2
commit 889a05fdd4
7 changed files with 7 additions and 7 deletions

View file

@ -158,7 +158,7 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey,
void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry)
{
entry.pushKV("txid", tx.GetHash().GetHex());
entry.pushKV("hash", tx.GetWitnessHash().GetHex());
entry.pushKV("hash", tx.GetHashWithWitness().GetHex());
entry.pushKV("version", tx.nVersion);
entry.pushKV("locktime", (int64_t)tx.nLockTime);