Expose txinwitness for coinbase in JSON form

txinwitness is used as the witness commitment nonce so is necessary if
reconstructing block data from RPC data.
pull/764/head
Rod Vagg 5 years ago
parent f54753293f
commit 3e4421070a
No known key found for this signature in database
GPG Key ID: C273792F7D83545D

@ -198,6 +198,7 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
o.pushKV("asm", ScriptToAsmStr(txin.scriptSig, true));
o.pushKV("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()));
in.pushKV("scriptSig", o);
}
if (!tx.vin[i].scriptWitness.IsNull()) {
UniValue txinwitness(UniValue::VARR);
for (const auto& item : tx.vin[i].scriptWitness.stack) {
@ -205,7 +206,6 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
}
in.pushKV("txinwitness", txinwitness);
}
}
in.pushKV("sequence", (int64_t)txin.nSequence);
vin.push_back(in);
}

Loading…
Cancel
Save