Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show All 36 Lines | |||||
#include <wallet/finaltx.h> | #include <wallet/finaltx.h> | ||||
#include <boost/algorithm/string/replace.hpp> | #include <boost/algorithm/string/replace.hpp> | ||||
#include <algorithm> | #include <algorithm> | ||||
#include <cassert> | #include <cassert> | ||||
#include <future> | #include <future> | ||||
static const size_t OUTPUT_GROUP_MAX_ENTRIES = 10; | static std::vector<CWallet *> vpwallets; | ||||
bool AddWallet(CWallet *wallet) { | |||||
assert(wallet); | |||||
std::vector<CWallet *>::const_iterator i = | |||||
std::find(vpwallets.begin(), vpwallets.end(), wallet); | |||||
if (i != vpwallets.end()) return false; | |||||
Fabien: Braces | |||||
vpwallets.push_back(wallet); | |||||
return true; | |||||
} | |||||
bool RemoveWallet(CWallet *wallet) { | |||||
assert(wallet); | |||||
std::vector<CWallet *>::iterator i = | |||||
std::find(vpwallets.begin(), vpwallets.end(), wallet); | |||||
if (i == vpwallets.end()) return false; | |||||
FabienUnsubmitted Not Done Inline ActionsDito Fabien: Dito | |||||
vpwallets.erase(i); | |||||
return true; | |||||
} | |||||
std::vector<CWallet *> vpwallets; | std::vector<CWallet *> GetWallets() { | ||||
return vpwallets; | |||||
} | |||||
CWallet *GetWallet(const std::string &name) { | |||||
for (CWallet *wallet : vpwallets) { | |||||
if (wallet->GetName() == name) return wallet; | |||||
FabienUnsubmitted Not Done Inline ActionsDito Fabien: Dito | |||||
} | |||||
return nullptr; | |||||
} | |||||
static const size_t OUTPUT_GROUP_MAX_ENTRIES = 10; | |||||
OutputType g_address_type = OutputType::NONE; | OutputType g_address_type = OutputType::NONE; | ||||
OutputType g_change_type = OutputType::NONE; | OutputType g_change_type = OutputType::NONE; | ||||
const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000; | const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000; | ||||
const uint256 CMerkleTx::ABANDON_HASH(uint256S( | const uint256 CMerkleTx::ABANDON_HASH(uint256S( | ||||
"0000000000000000000000000000000000000000000000000000000000000001")); | "0000000000000000000000000000000000000000000000000000000000000001")); | ||||
▲ Show 20 Lines • Show All 4,640 Lines • Show Last 20 Lines |
Braces