Skip to content

Commit

Permalink
Fix stupid typo (#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 authored Jan 5, 2021
1 parent a4fe0da commit 8e2d495
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1466,22 +1466,24 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
LogPrintf("Updating mint state from Mempool..");
BOOST_FOREACH(const CTxOut &txout, tx.vout)
{
GroupElement pubCoinValue;
uint64_t amount = 0;
try {
if (txout.scriptPubKey.IsLelantusMint()) {
lelantus::ParseLelantusMintScript(txout.scriptPubKey, pubCoinValue);
amount = txout.nValue;
} else {
std::vector<unsigned char> encryptedValue;
lelantus::ParseLelantusJMintScript(txout.scriptPubKey, pubCoinValue, encryptedValue);
if(!pwalletMain->DecryptMintAmount(encryptedValue, pubCoinValue, amount))
amount = 0;
if (txout.scriptPubKey.IsLelantusMint() || txout.scriptPubKey.IsLelantusJMint()) {
GroupElement pubCoinValue;
uint64_t amount = 0;
try {
if (txout.scriptPubKey.IsLelantusMint()) {
lelantus::ParseLelantusMintScript(txout.scriptPubKey, pubCoinValue);
amount = txout.nValue;
} else {
std::vector<unsigned char> encryptedValue;
lelantus::ParseLelantusJMintScript(txout.scriptPubKey, pubCoinValue, encryptedValue);
if(!pwalletMain->DecryptMintAmount(encryptedValue, pubCoinValue, amount))
amount = 0;
}
} catch (std::invalid_argument&) {
return state.DoS(100, false, PUBCOIN_NOT_VALIDATE, "bad-txns-zerocoin");
}
} catch (std::invalid_argument&) {
return state.DoS(100, false, PUBCOIN_NOT_VALIDATE, "bad-txns-zerocoin");
lelantusAmounts.push_back(amount);
}
lelantusAmounts.push_back(amount);
}
pwalletMain->zwallet->GetTracker().UpdateLelantusMintStateFromMempool(lelantusMintPubcoins, lelantusAmounts);
}
Expand Down

0 comments on commit 8e2d495

Please sign in to comment.