mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge #915: [0.18 backport] Backport #904: Fix parsing of amount commitments from prevtxs in signrawtransactionw…
4e3161620 Fix parsing of amount commitments from prevtxs in signrawtransactionwithkey (Glenn Willen)
Pull request description:
Tree-SHA512: ead69e32fb14ee85f776f786f8510df1b71432e2f3fa02588913c94566219d7b951987162be205269a67acc8b1f1cca84e78278b4bb28fb129b9ca339cda1672
This commit is contained in:
commit
e77d754b88
1 changed files with 1 additions and 2 deletions
|
|
@ -956,8 +956,7 @@ UniValue SignTransaction(interfaces::Chain& chain, CMutableTransaction& mtx, con
|
|||
newcoin.out.nValue = CConfidentialValue(AmountFromValue(find_value(prevOut, "amount")));
|
||||
} else if (prevOut.exists("amountcommitment")) {
|
||||
// Segwit sigs require the amount commitment to be sighashed
|
||||
uint256 asset_commit = uint256S(prevOut["amountcommitment"].get_str());
|
||||
newcoin.out.nValue.vchCommitment = std::vector<unsigned char>(asset_commit.begin(), asset_commit.end());
|
||||
newcoin.out.nValue.vchCommitment = ParseHexO(prevOut, "amountcommitment");
|
||||
}
|
||||
newcoin.nHeight = 1;
|
||||
view.AddCoin(out, std::move(newcoin), true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue