Merge pull request #6201 from sellout/fix-disable-wallet

Fix building with --disable-wallet
This commit is contained in:
Daira Hopwood 2022-10-19 07:36:23 +01:00 committed by GitHub
commit a6141281d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,8 @@
#include "gtest/utils.h" #include "gtest/utils.h"
#include "rpc/server.h" #include "rpc/server.h"
#ifdef ENABLE_WALLET
#include "wallet/wallet.h" #include "wallet/wallet.h"
#endif
int GenZero(int n) int GenZero(int n)
{ {
@ -35,6 +37,8 @@ void LoadProofParameters() {
); );
} }
#ifdef ENABLE_WALLET
void LoadGlobalWallet() { void LoadGlobalWallet() {
CCoinsViewDB *pcoinsdbview; CCoinsViewDB *pcoinsdbview;
bool fFirstRun; bool fFirstRun;
@ -66,4 +70,6 @@ void UnloadGlobalWallet() {
bitdb.Flush(true); bitdb.Flush(true);
bitdb.Reset(); bitdb.Reset();
} }
#endif

View File

@ -1524,7 +1524,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
RegisterNodeSignals(GetNodeSignals()); RegisterNodeSignals(GetNodeSignals());
// sanitize comments per BIP-0014, format user agent and check total size // sanitize comments per BIP-0014, format user agent and check total size
std::vector<string> uacomments; std::vector<std::string> uacomments;
for (std::string cmt : mapMultiArgs["-uacomment"]) for (std::string cmt : mapMultiArgs["-uacomment"])
{ {
if (cmt != SanitizeString(cmt, SAFE_CHARS_UA_COMMENT)) if (cmt != SanitizeString(cmt, SAFE_CHARS_UA_COMMENT))