Use custom current blockchain height function

This commit is contained in:
moneroexamples 2016-11-22 05:30:33 +08:00
parent a3af1bfa0f
commit 4b32f7e943
1 changed files with 2 additions and 2 deletions

View File

@ -725,13 +725,13 @@ namespace xmreg {
//cout << "_blk_height: " << _blk_height << endl;
uint64_t current_blockchain_height
= core_storage->get_current_blockchain_height();
= xmreg::MyLMDB::get_blockchain_height(mcore->get_blkchain_path()) - 1;
if (_blk_height > current_blockchain_height)
{
cerr << "Cant get block: " << _blk_height
<< " since its higher than current blockchain height"
<< "i.e., " << current_blockchain_height
<< " i.e., " << current_blockchain_height
<< endl;
return fmt::format("Cant get block {:d} since its higher than current blockchain height!",
_blk_height);