Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ qrc_*.cpp
# Mac specific
.DS_Store
build
*.dSYM

#lcov
*.gcno
Expand Down
1 change: 0 additions & 1 deletion src/bench/bls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ static void BLS_Sign_Normal(benchmark::State& state)
{
CBLSSecretKey secKey;
secKey.MakeNewKey();
CBLSPublicKey pubKey = secKey.GetPublicKey();

// Benchmark.
while (state.KeepRunning()) {
Expand Down
4 changes: 2 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ void ThreadImport(std::vector<fs::path> vImportFiles)

{
// Get all UTXOs for each MN collateral in one go so that we can fill coin cache early
// and reduce further locking overhead for cs_main in other parts of code inclluding GUI
// and reduce further locking overhead for cs_main in other parts of code including GUI
LogPrintf("Filling coin cache with masternode UTXOs...\n");
LOCK(cs_main);
int64_t nStart = GetTimeMillis();
Expand Down Expand Up @@ -1461,7 +1461,7 @@ bool AppInitParameterInteraction()
}

if (gArgs.IsArgSet("-dip3params")) {
// Allow overriding budget parameters for testing
// Allow overriding dip3 parameters for testing
if (!chainparams.MineBlocksOnDemand()) {
return InitError("DIP3 parameters may only be overridden on regtest.");
}
Expand Down
2 changes: 1 addition & 1 deletion src/llmq/quorums_chainlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void CChainLocksHandler::TrySignChainTip()
}
if (HasChainLock(pindexWalk->nHeight, pindexWalk->GetBlockHash())) {
// we don't care about islocks for TXs that are ChainLocked already
LogPrint(BCLog::CHAINLOCKS, "CChainLocksHandler::%s -- chainlock at height %d \n", __func__, pindexWalk->nHeight);
LogPrint(BCLog::CHAINLOCKS, "CChainLocksHandler::%s -- chainlock at height %d\n", __func__, pindexWalk->nHeight);
break;
}

Expand Down
2 changes: 1 addition & 1 deletion src/llmq/quorums_signing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ void CSigningManager::ProcessRecoveredSig(const std::shared_ptr<const CRecovered
auto signHash = CLLMQUtils::BuildSignHash(*recoveredSig);

LogPrint(BCLog::LLMQ, "CSigningManager::%s -- valid recSig. signHash=%s, id=%s, msgHash=%s\n", __func__,
signHash.ToString(), recoveredSig->id .ToString(), recoveredSig->msgHash.ToString());
signHash.ToString(), recoveredSig->id.ToString(), recoveredSig->msgHash.ToString());

if (db.HasRecoveredSigForId(llmqType, recoveredSig->id)) {
CRecoveredSig otherRecoveredSig;
Expand Down
4 changes: 2 additions & 2 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3732,8 +3732,8 @@ bool PeerLogicValidation::ProcessMessages(CNode* pfrom, std::atomic<bool>& inter
else
{
PrintExceptionContinue(std::current_exception(), "ProcessMessages()");
}
} catch (...) {
}
} catch (...) {
PrintExceptionContinue(std::current_exception(), "ProcessMessages()");
}

Expand Down
4 changes: 2 additions & 2 deletions src/rpc/coinjoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ UniValue getcoinjoininfo(const JSONRPCRequest& request)
coinJoinClientManagers.at(pwallet->GetName())->GetJsonInfo(obj);

obj.pushKV("keys_left", pwallet->nKeysLeftSinceAutoBackup);
obj.push_back(Pair("warnings", pwallet->nKeysLeftSinceAutoBackup < COINJOIN_KEYS_THRESHOLD_WARNING
? "WARNING: keypool is almost depleted!" : ""));
obj.pushKV("warnings", pwallet->nKeysLeftSinceAutoBackup < COINJOIN_KEYS_THRESHOLD_WARNING
? "WARNING: keypool is almost depleted!" : "");
#endif // ENABLE_WALLET

return obj;
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ UniValue signrawtransactionwithkey(const JSONRPCRequest& request)
" \"txid\":\"id\", (string, required) The transaction id\n"
" \"vout\":n, (numeric, required) The output number\n"
" \"scriptPubKey\": \"hex\", (string, required) script key\n"
" \"redeemScript\": \"hex\", (string, required for P2SH or P2WSH) redeem script\n"
" \"redeemScript\": \"hex\", (string, required for P2SH) redeem script\n"
" \"amount\": value (numeric, required) The amount spent\n"
" }\n"
" ,...\n"
Expand Down
3 changes: 2 additions & 1 deletion src/rpc/rpcquorums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ UniValue quorum_memberof(const JSONRPCRequest& request)
void quorum_sign_help()
{
throw std::runtime_error(
"quorum sign llmqType \"id\" \"msgHash\" ( \"quorumHash\" )\n"
"quorum sign llmqType \"id\" \"msgHash\" ( \"quorumHash\" submit )\n"
"Threshold-sign a message\n"
"\nArguments:\n"
"1. llmqType (int, required) LLMQ type.\n"
Expand Down Expand Up @@ -616,6 +616,7 @@ UniValue quorum_getdata(const JSONRPCRequest& request)
" getrecsig - Get a recovered signature\n"
" isconflicting - Test if a conflict exists\n"
" selectquorum - Return the quorum that would/should sign a request\n"
" getdata - Request quorum data from other masternodes in the quorum\n"
);
}

Expand Down
9 changes: 4 additions & 5 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ uint64_t nPruneTarget = 0;
int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE;

std::atomic<bool> fDIP0001ActiveAtTip{false};
std::atomic<bool> fDIP0003ActiveAtTip{false};

uint256 hashAssumeValid;
arith_uint256 nMinimumChainWork;
Expand Down Expand Up @@ -2532,7 +2531,7 @@ bool static FlushStateToDisk(const CChainParams& chainparams, CValidationState &
}
int64_t nMempoolSizeMax = gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
int64_t cacheSize = pcoinsTip->DynamicMemoryUsage();
cacheSize += evoDb->GetMemoryUsage();
cacheSize += evoDb->GetMemoryUsage();
int64_t nTotalSpace = nCoinCacheUsage + std::max<int64_t>(nMempoolSizeMax - nMempoolUsage, 0);
// The cache is large and we're within 10% and 10 MiB of the limit, but we have time now (not in the middle of a block processing).
bool fCacheLarge = mode == FlushStateMode::PERIODIC && cacheSize > std::max((9 * nTotalSpace) / 10, nTotalSpace - MAX_BLOCK_COINSDB_USAGE * 1024 * 1024);
Expand Down Expand Up @@ -2586,9 +2585,9 @@ bool static FlushStateToDisk(const CChainParams& chainparams, CValidationState &
// Flush the chainstate (which may refer to block index entries).
if (!pcoinsTip->Flush())
return AbortNode(state, "Failed to write to coin database");
if (!evoDb->CommitRootTransaction()) {
return AbortNode(state, "Failed to commit EvoDB");
}
if (!evoDb->CommitRootTransaction()) {
return AbortNode(state, "Failed to commit EvoDB");
}
nLastFlush = nNow;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ void WalletInit::AddWalletOptions() const
gArgs.AddArg("-spendzeroconfchange", strprintf("Spend unconfirmed change when sending transactions (default: %u)", DEFAULT_SPEND_ZEROCONF_CHANGE), false, OptionsCategory::WALLET);
gArgs.AddArg("-upgradewallet", "Upgrade wallet to latest format on startup", false, OptionsCategory::WALLET);
gArgs.AddArg("-wallet=<path>", "Specify wallet database path. Can be specified multiple times to load multiple wallets. Path is interpreted relative to <walletdir> if it is not absolute, and will be created if it does not exist (as a directory containing a wallet.dat file and log files). For backwards compatibility this will also accept names of existing data files in <walletdir>.)", false, OptionsCategory::WALLET);
gArgs.AddArg("-walletbackupsdir=<dir>", "Specify full path to directory for automatic wallet backups (must exist)", false, OptionsCategory::WALLET);
gArgs.AddArg("-walletbroadcast", strprintf("Make the wallet broadcast transactions (default: %u)", DEFAULT_WALLETBROADCAST), false, OptionsCategory::WALLET);
gArgs.AddArg("-walletdir=<dir>", "Specify directory to hold wallets (default: <datadir>/wallets if it exists, otherwise <datadir>)", false, OptionsCategory::WALLET);
gArgs.AddArg("-walletnotify=<cmd>", "Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)", false, OptionsCategory::WALLET);
gArgs.AddArg("-zapwallettxes=<mode>", "Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup"
" (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)", false, OptionsCategory::WALLET);
gArgs.AddArg("-walletbackupsdir=<dir>", "Specify full path to directory for automatic wallet backups (must exist)", false, OptionsCategory::WALLET);

gArgs.AddArg("-discardfee=<amt>", strprintf("The fee rate (in %s/kB) that indicates your tolerance for discarding change by adding it to the fee (default: %s). "
"Note: An output is discarded if it is dust at this rate, but we will always discard up to the dust relay fee and a discard fee above that is limited by the fee estimate for the longest target",
Expand All @@ -96,9 +96,9 @@ void WalletInit::AddWalletOptions() const

gArgs.AddArg("-keepass", strprintf("Use KeePass 2 integration using KeePassHttp plugin (default: %u)", 0), false, OptionsCategory::WALLET_KEEPASS);
gArgs.AddArg("-keepassid=<id>", "KeePassHttp id for the established association", false, OptionsCategory::WALLET_KEEPASS);
gArgs.AddArg("-keepasskey=<key>", "KeePassHttp key for AES encrypted communication with KeePass", false, OptionsCategory::WALLET_KEEPASS);
gArgs.AddArg("-keepassname=<name>", "Name to construct url for KeePass entry that stores the wallet passphrase", false, OptionsCategory::WALLET_KEEPASS);
gArgs.AddArg("-keepassport=<port>", strprintf("Connect to KeePassHttp on port <port> (default: %u)", DEFAULT_KEEPASS_HTTP_PORT), false, OptionsCategory::WALLET_KEEPASS);
gArgs.AddArg("-keepasskey=<key>", "KeePassHttp key for AES encrypted communication with KeePass", false, OptionsCategory::WALLET_KEEPASS);

gArgs.AddArg("-enablecoinjoin", strprintf("Enable use of CoinJoin for funds stored in this wallet (0-1, default: %u)", 0), false, OptionsCategory::WALLET_COINJOIN);
gArgs.AddArg("-coinjoinamount=<n>", strprintf("Target CoinJoin balance (%u-%u, default: %u)", MIN_COINJOIN_AMOUNT, MAX_COINJOIN_AMOUNT, DEFAULT_COINJOIN_AMOUNT), false, OptionsCategory::WALLET_COINJOIN);
Expand Down
6 changes: 3 additions & 3 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void CWallet::DeriveNewChildKey(WalletBatch &batch, const CKeyMetadata& metadata
}

if (!DecryptHDChain(hdChainTmp))
throw std::runtime_error(std::string(__func__) + ": DecryptHDChainSeed failed");
throw std::runtime_error(std::string(__func__) + ": DecryptHDChain failed");
// make sure seed matches this chain
if (hdChainTmp.GetID() != hdChainTmp.GetSeedHash())
throw std::runtime_error(std::string(__func__) + ": Wrong HD chain!");
Expand Down Expand Up @@ -301,7 +301,7 @@ bool CWallet::GetKey(const CKeyID &address, CKey& keyOut) const
if (!GetHDChain(hdChainCurrent))
throw std::runtime_error(std::string(__func__) + ": GetHDChain failed");
if (!DecryptHDChain(hdChainCurrent))
throw std::runtime_error(std::string(__func__) + ": DecryptHDChainSeed failed");
throw std::runtime_error(std::string(__func__) + ": DecryptHDChain failed");
// make sure seed matches this chain
if (hdChainCurrent.GetID() != hdChainCurrent.GetSeedHash())
throw std::runtime_error(std::string(__func__) + ": Wrong HD chain!");
Expand Down Expand Up @@ -4034,7 +4034,7 @@ bool CWallet::CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::ve
wtxNew.fTimeReceivedIsTxTime = true;
wtxNew.fFromMe = true;

LogPrintf("CommitTransaction:\n%s\n", wtxNew.tx->ToString());
LogPrintf("CommitTransaction:\n%s", wtxNew.tx->ToString()); /* Continued */
{
// Take key pair from key pool so it won't be used again
reservekey.KeepKey();
Expand Down