Skip to content

Commit

Permalink
Catch exception thrown from CheckLelantusJMintTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
psolstice committed Oct 18, 2023
1 parent 8529bec commit 7f91fce
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lelantus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,13 @@ bool CheckLelantusJoinSplitTransaction(

for (const CTxOut &txout : tx.vout) {
if (!txout.scriptPubKey.empty() && txout.scriptPubKey.IsLelantusJMint()) {
if (!CheckLelantusJMintTransaction(txout, state, hashTx, fStatefulSigmaCheck, Cout, lelantusTxInfo))
return false;
try {
if (!CheckLelantusJMintTransaction(txout, state, hashTx, fStatefulSigmaCheck, Cout, lelantusTxInfo))
return false;
}
catch (const std::exception &x) {
return state.Error(x.what());
}
} else if(txout.scriptPubKey.IsLelantusMint()) {
return false; //putting regular mints at JoinSplit transactions is not allowed
} else {
Expand Down

0 comments on commit 7f91fce

Please sign in to comment.