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 20, 2023
1 parent 59a52c1 commit f38c58f
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 @@ -433,8 +433,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 f38c58f

Please sign in to comment.