diff options
author | stoffu <stoffu@protonmail.ch> | 2018-03-05 23:59:16 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2018-03-05 23:59:16 +0900 |
commit | 0e7ad2e2c95814ed13b6d84fc3647fa5652cc134 (patch) | |
tree | f945dc14b539735b1225d4b30e2462fb95bea5d2 /src/wallet/api/wallet.h | |
parent | Stagenet (diff) | |
download | monero-0e7ad2e2c95814ed13b6d84fc3647fa5652cc134.tar.xz |
Wallet API: generalize 'bool testnet' to 'NetworkType nettype'
Diffstat (limited to 'src/wallet/api/wallet.h')
-rw-r--r-- | src/wallet/api/wallet.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index aa5b362df..9b4a0cc12 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -52,7 +52,7 @@ struct Wallet2CallbackImpl; class WalletImpl : public Wallet { public: - WalletImpl(bool testnet = false); + WalletImpl(NetworkType nettype = MAINNET); ~WalletImpl(); bool create(const std::string &path, const std::string &password, const std::string &language); @@ -115,7 +115,7 @@ public: void setRecoveringFromSeed(bool recoveringFromSeed); bool watchOnly() const; bool rescanSpent(); - bool testnet() const {return m_wallet->nettype() == cryptonote::TESTNET;} + NetworkType nettype() const {return static_cast<NetworkType>(m_wallet->nettype());} void hardForkInfo(uint8_t &version, uint64_t &earliest_height) const; bool useForkRules(uint8_t version, int64_t early_blocks) const; |