aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api
diff options
context:
space:
mode:
authorJacob Brydolf <jacob@brydolf.net>2016-11-10 15:36:16 +0100
committerJacob Brydolf <jacob@brydolf.net>2016-11-13 03:36:44 +0100
commit4fca34ddb4d711ad45f4ecb30d74c7d8ebdcba5b (patch)
tree9acd7738856770ae641b85179b5aac1652e7a3de /src/wallet/api
parentMerge pull request #1330 (diff)
downloadmonero-4fca34ddb4d711ad45f4ecb30d74c7d8ebdcba5b.tar.xz
Wallet2: calculate approximate blockchain height on offline creation
Wallet API: add approximateBlockChainHeight()
Diffstat (limited to 'src/wallet/api')
-rw-r--r--src/wallet/api/wallet.cpp5
-rw-r--r--src/wallet/api/wallet.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 134ea601c..d21d8b900 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -469,7 +469,10 @@ uint64_t WalletImpl::blockChainHeight() const
{
return m_wallet->get_blockchain_current_height();
}
-
+uint64_t WalletImpl::approximateBlockChainHeight() const
+{
+ return m_wallet->get_approximate_blockchain_height();
+}
uint64_t WalletImpl::daemonBlockChainHeight() const
{
std::string err;
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
index 372d6efd7..02a46da8c 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -76,6 +76,7 @@ public:
uint64_t balance() const;
uint64_t unlockedBalance() const;
uint64_t blockChainHeight() const;
+ uint64_t approximateBlockChainHeight() const;
uint64_t daemonBlockChainHeight() const;
uint64_t daemonBlockChainTargetHeight() const;
bool synchronized() const;