Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/init.cpp
Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | if (is_multiwallet) { | ||||
} | } | ||||
} | } | ||||
if (gArgs.GetBoolArg("-sysperms", false)) { | if (gArgs.GetBoolArg("-sysperms", false)) { | ||||
return InitError("-sysperms is not allowed in combination with enabled " | return InitError("-sysperms is not allowed in combination with enabled " | ||||
"wallet functionality"); | "wallet functionality"); | ||||
} | } | ||||
if (gArgs.GetArg("-prune", 0) && gArgs.GetBoolArg("-rescan", false)) { | |||||
return InitError( | |||||
_("Rescans are not possible in pruned mode. You will need to use " | |||||
"-reindex which will download the whole blockchain again.") | |||||
.translated); | |||||
} | |||||
return true; | return true; | ||||
} | } | ||||
void WalletInit::Construct(NodeContext &node) const { | void WalletInit::Construct(NodeContext &node) const { | ||||
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) { | if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) { | ||||
LogPrintf("Wallet disabled!\n"); | LogPrintf("Wallet disabled!\n"); | ||||
return; | return; | ||||
} | } | ||||
gArgs.SoftSetArg("-wallet", ""); | gArgs.SoftSetArg("-wallet", ""); | ||||
node.chain_clients.emplace_back( | node.chain_clients.emplace_back( | ||||
interfaces::MakeWalletClient(*node.chain, gArgs.GetArgs("-wallet"))); | interfaces::MakeWalletClient(*node.chain, gArgs.GetArgs("-wallet"))); | ||||
} | } |