diff options
| author | Jakob Lind <karl.jakob.lind@gmail.com> | 2014-08-01 10:17:50 +0200 |
|---|---|---|
| committer | Jakob Lind <karl.jakob.lind@gmail.com> | 2014-08-01 10:17:50 +0200 |
| commit | e4273f24153ca5222ab0af6ea6d84b7761e31f05 (patch) | |
| tree | 30c2413ec7c761d9326d6131bcbcbb0bc61dcb5a /src/cryptonote_core/blockchain_storage.cpp | |
| parent | 78696677998395053c186b5063136434f3dce13f (diff) | |
| download | monzero-core-e4273f24153ca5222ab0af6ea6d84b7761e31f05.tar.gz monzero-core-e4273f24153ca5222ab0af6ea6d84b7761e31f05.tar.xz monzero-core-e4273f24153ca5222ab0af6ea6d84b7761e31f05.zip | |
#36 simplewallet refresh include optional height param
height param is used optionally in refresh command
TODO: This should also be the default behaviour
when generating a new wallet.
Diffstat (limited to 'src/cryptonote_core/blockchain_storage.cpp')
| -rw-r--r-- | src/cryptonote_core/blockchain_storage.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cryptonote_core/blockchain_storage.cpp b/src/cryptonote_core/blockchain_storage.cpp index aaca0670b..e47c35ea5 100644 --- a/src/cryptonote_core/blockchain_storage.cpp +++ b/src/cryptonote_core/blockchain_storage.cpp @@ -1149,11 +1149,15 @@ bool blockchain_storage::find_blockchain_supplement(const std::list<crypto::hash return true; } //------------------------------------------------------------------ -bool blockchain_storage::find_blockchain_supplement(const std::list<crypto::hash>& qblock_ids, std::list<std::pair<block, std::list<transaction> > >& blocks, uint64_t& total_height, uint64_t& start_height, size_t max_count) +bool blockchain_storage::find_blockchain_supplement(const uint64_t req_start_block, const std::list<crypto::hash>& qblock_ids, std::list<std::pair<block, std::list<transaction> > >& blocks, uint64_t& total_height, uint64_t& start_height, size_t max_count) { CRITICAL_REGION_LOCAL(m_blockchain_lock); - if(!find_blockchain_supplement(qblock_ids, start_height)) - return false; + if(req_start_block > 0) { + start_height = req_start_block; + } else { + if(!find_blockchain_supplement(qblock_ids, start_height)) + return false; + } total_height = get_current_blockchain_height(); size_t count = 0; |
