mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
fix: minor fixes
This commit is contained in:
parent
6435e06408
commit
fe648bc6f5
3 changed files with 4 additions and 3 deletions
|
|
@ -26,10 +26,8 @@ static bool CheckProofGeneric(const CBlockHeader& block, const uint32_t max_bloc
|
|||
|
||||
// Check signature limits for blocks
|
||||
if (scriptSig.size() > max_block_signature_size) {
|
||||
assert(!is_dyna);
|
||||
return false;
|
||||
} else if (witness.GetSerializedSize() > max_block_signature_size) {
|
||||
assert(is_dyna);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@ bool DecomposePeginWitness(const CScriptWitness& witness, CAmount& value, CAsset
|
|||
{
|
||||
const auto& stack = witness.stack;
|
||||
|
||||
if (stack.size() < 5) return false;
|
||||
if (stack.size() != 6) return false;
|
||||
|
||||
CDataStream stream(stack[0], SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream >> value;
|
||||
|
|
|
|||
|
|
@ -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