Skip to content

Commit 3a07baa

Browse files
delta1psgreco
authored andcommitted
fix: minor fixes
(cherry picked from commit fe648bc)
1 parent 9453858 commit 3a07baa

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/block_proof.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ static bool CheckProofGeneric(const CBlockHeader& block, const uint32_t max_bloc
2626

2727
// Check signature limits for blocks
2828
if (scriptSig.size() > max_block_signature_size) {
29-
assert(!is_dyna);
3029
return false;
3130
} else if (witness.GetSerializedSize() > max_block_signature_size) {
32-
assert(is_dyna);
3331
return false;
3432
}
3533

src/pegins.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ bool DecomposePeginWitness(const CScriptWitness& witness, CAmount& value, CAsset
552552
{
553553
const auto& stack = witness.stack;
554554

555-
if (stack.size() < 5) return false;
555+
if (stack.size() != 6) return false;
556556

557557
CDataStream stream(stack[0], SER_NETWORK, PROTOCOL_VERSION);
558558
stream >> value;

src/wallet/rpc/elements.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,9 @@ RPCHelpMan blindrawtransaction()
12751275
// Vacuous, just return the transaction
12761276
return EncodeHexTx(CTransaction(tx));
12771277
} else if (n_blinded_ins > 0 && num_pubkeys == 0) {
1278+
if (tx.vout.empty()) {
1279+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Unable to blind transaction: transaction has no outputs to balance blinded inputs against.");
1280+
}
12781281
// Blinded inputs need to balanced with something to be valid, make a dummy.
12791282
CTxOut newTxOut(tx.vout.back().nAsset.GetAsset(), 0, CScript() << OP_RETURN);
12801283
tx.vout.push_back(newTxOut);

0 commit comments

Comments
 (0)