mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
fix: minor fixes
This commit is contained in:
parent
6435e06408
commit
fe648bc6f5
3 changed files with 4 additions and 3 deletions
|
|
@ -1376,6 +1376,9 @@ RPCHelpMan blindrawtransaction()
|
|||
// Vacuous, just return the transaction
|
||||
return EncodeHexTx(CTransaction(tx));
|
||||
} else if (n_blinded_ins > 0 && num_pubkeys == 0) {
|
||||
if (tx.vout.empty()) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Unable to blind transaction: transaction has no outputs to balance blinded inputs against.");
|
||||
}
|
||||
// Blinded inputs need to balanced with something to be valid, make a dummy.
|
||||
CTxOut newTxOut(tx.vout.back().nAsset.GetAsset(), 0, CScript() << OP_RETURN);
|
||||
tx.vout.push_back(newTxOut);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue