Skip to content

Commit 72ab564

Browse files
authored
Merge pull request #1561 from delta1/2026-06-fixes
23.x minor fixes
2 parents 048fe6a + fe648bc commit 72ab564

4 files changed

Lines changed: 5 additions & 4 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/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ class MemPoolAccept
673673
// calculate the burned subsidy value from the tx
674674
CAmount subsidy = 0;
675675
for (const CTxOut& txout : tx.vout) {
676-
if (txout.scriptPubKey.IsUnspendable() && txout.nAsset.GetAsset() == Params().GetConsensus().pegged_asset && !txout.IsFee()) {
676+
if (txout.scriptPubKey.IsUnspendable() && !txout.IsFee() && txout.nAsset.IsExplicit() && txout.nValue.IsExplicit() && txout.nAsset.GetAsset() == Params().GetConsensus().pegged_asset) {
677677
subsidy += txout.nValue.GetAmount();
678678
}
679679
}

src/wallet/rpc/elements.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,9 @@ RPCHelpMan blindrawtransaction()
13761376
// Vacuous, just return the transaction
13771377
return EncodeHexTx(CTransaction(tx));
13781378
} else if (n_blinded_ins > 0 && num_pubkeys == 0) {
1379+
if (tx.vout.empty()) {
1380+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Unable to blind transaction: transaction has no outputs to balance blinded inputs against.");
1381+
}
13791382
// Blinded inputs need to balanced with something to be valid, make a dummy.
13801383
CTxOut newTxOut(tx.vout.back().nAsset.GetAsset(), 0, CScript() << OP_RETURN);
13811384
tx.vout.push_back(newTxOut);

0 commit comments

Comments
 (0)