mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge #904: Fix parsing of amount commitments from prevtxs in signrawtrasnactionwithkey
a4045d21e Fix parsing of amount commitments from prevtxs in signrawtransactionwithkey (Glenn Willen)
Pull request description:
Tree-SHA512: 4bc38ac4bcf09c3dc0dd5a5bdcb75a031a6a86a8848390e63c1c466f1788155f6f6456b1aa3b36078c35d62d6093667c70a6895eb1ab59d6704300ebac8bbe56
This commit is contained in:
commit
58bf5653ed
1 changed files with 1 additions and 2 deletions
|
|
@ -1105,8 +1105,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