Skip to content

Commit 46558c5

Browse files
Merge
2 parents d7d6411 + 680643d commit 46558c5

File tree

4 files changed

+25
-20
lines changed

4 files changed

+25
-20
lines changed

src/batchproof_container.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,16 @@ void BatchProofContainer::removeLelantus(std::unordered_map<Scalar, int> spentSe
7474
int id = spendSerial.second;
7575

7676
// afterFixes bool with the pair of set id is considered separate set identifiers, so try to find in one set, if not found try also in another
77-
std::pair<uint32_t, bool> key = std::make_pair(id, false);
77+
std::pair<uint32_t, bool> key1 = std::make_pair(id, false);
78+
std::pair<uint32_t, bool> key2 = std::make_pair(id, true);
7879
std::vector<LelantusSigmaProofData>* vProofs;
79-
if (lelantusSigmaProofs.count(key) > 0) {
80-
vProofs = &lelantusSigmaProofs[key];
80+
if (lelantusSigmaProofs.count(key1) > 0) {
81+
vProofs = &lelantusSigmaProofs[key1];
82+
erase(vProofs, spendSerial.first);
83+
}
84+
85+
if (lelantusSigmaProofs.count(key2) > 0) {
86+
vProofs = &lelantusSigmaProofs[key2];
8187
erase(vProofs, spendSerial.first);
8288
}
8389
}

src/qt/automintmodel.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void IncomingFundNotifier::check()
5555
return;
5656

5757
// update only if there are transaction and last update was done more than 2 minutes ago, and in case it is first time
58-
if ((lastUpdateTime!= 0 && (GetSystemTimeInSeconds() - lastUpdateTime <= 120))) {
58+
if (txs.empty() || (lastUpdateTime!= 0 && (GetSystemTimeInSeconds() - lastUpdateTime <= 120))) {
5959
return;
6060
}
6161

@@ -97,7 +97,6 @@ void IncomingFundNotifier::check()
9797
for (auto const &valueAndUTXO : valueAndUTXOs) {
9898
credit += valueAndUTXO.first;
9999
}
100-
101100
}
102101

103102
for (auto const &tx : immatures) {

src/test/lelantus_mintspend_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(lelantus_mintspend_test)
7676
CWalletTx result;
7777
{
7878
std::vector<CHDMint> mintCoins; // new mints
79-
CAmount fee;
79+
CAmount fee = 0;
8080
result = pwalletMain->CreateLelantusJoinSplitTransaction(recipients, fee, {}, spendCoins, mintCoins);
8181
pwalletMain->CommitLelantusTransaction(result, spendCoins, mintCoins);
8282
}
@@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE(lelantus_mintspend_test)
104104
result.Init(NULL);
105105
{
106106
std::vector<CHDMint> mintCoins; // new mints
107-
CAmount fee;
107+
CAmount fee = 0;
108108
result = pwalletMain->CreateLelantusJoinSplitTransaction(recipients, fee, {}, spendCoins, mintCoins);
109109
pwalletMain->CommitLelantusTransaction(result, spendCoins, mintCoins);
110110
}

src/wallet/rpcwallet.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5263,19 +5263,19 @@ static const CRPCCommand commands[] =
52635263
{ "wallet", "walletpassphrase", &walletpassphrase, true, {"passphrase","timeout"} },
52645264
{ "wallet", "removeprunedfunds", &removeprunedfunds, true, {"txid"} },
52655265

5266-
{ "wallet", "listunspentlelantusmints", &listunspentlelantusmints, false },
5267-
{ "wallet", "mintlelantus", &mintlelantus, false },
5268-
{ "wallet", "autoMintlelantus", &autoMintlelantus, false },
5269-
{ "wallet", "joinsplit", &joinsplit, false },
5270-
{ "wallet", "resetlelantusmint", &resetlelantusmint, false },
5271-
{ "wallet", "setlelantusmintstatus", &setlelantusmintstatus, false },
5272-
{ "wallet", "listlelantusmints", &listlelantusmints, false },
5273-
5274-
{ "wallet", "setmininput", &setmininput, false },
5275-
{ "wallet", "regeneratemintpool", &regeneratemintpool, false },
5276-
{ "wallet", "removetxmempool", &removetxmempool, false },
5277-
{ "wallet", "removetxwallet", &removetxwallet, false },
5278-
{ "wallet", "listlelantusjoinsplits", &listlelantusjoinsplits, false },
5266+
{ "wallet", "listunspentlelantusmints", &listunspentlelantusmints, false, {} },
5267+
{ "wallet", "mintlelantus", &mintlelantus, false, {} },
5268+
{ "wallet", "autoMintlelantus", &autoMintlelantus, false, {} },
5269+
{ "wallet", "joinsplit", &joinsplit, false, {} },
5270+
{ "wallet", "resetlelantusmint", &resetlelantusmint, false, {} },
5271+
{ "wallet", "setlelantusmintstatus", &setlelantusmintstatus, false, {} },
5272+
{ "wallet", "listlelantusmints", &listlelantusmints, false, {} },
5273+
5274+
{ "wallet", "setmininput", &setmininput, false, {} },
5275+
{ "wallet", "regeneratemintpool", &regeneratemintpool, false, {} },
5276+
{ "wallet", "removetxmempool", &removetxmempool, false, {} },
5277+
{ "wallet", "removetxwallet", &removetxwallet, false, {} },
5278+
{ "wallet", "listlelantusjoinsplits", &listlelantusjoinsplits, false, {} },
52795279

52805280
//spark
52815281
{ "wallet", "listunspentsparkmints", &listunspentsparkmints, false, {} },

0 commit comments

Comments
 (0)