aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.h
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-03-05 23:59:16 +0900
committerstoffu <stoffu@protonmail.ch>2018-03-05 23:59:16 +0900
commit0e7ad2e2c95814ed13b6d84fc3647fa5652cc134 (patch)
treef945dc14b539735b1225d4b30e2462fb95bea5d2 /src/wallet/api/wallet.h
parentStagenet (diff)
downloadmonero-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.h4
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;