mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 08:17:55 +00:00
Fixed a crash in status
command
This commit is contained in:
parent
e828709090
commit
ec8e40907d
1 changed files with 4 additions and 2 deletions
|
@ -886,9 +886,11 @@ void SideChain::print_status(bool obtain_sidechain_lock) const
|
|||
|
||||
std::vector<MinerShare> shares;
|
||||
uint64_t bottom_height = 0;
|
||||
if (tip) {
|
||||
get_shares(tip, shares, &bottom_height, true);
|
||||
}
|
||||
|
||||
const uint64_t window_size = bottom_height ? (tip->m_sidechainHeight - bottom_height + 1U) : m_chainWindowSize;
|
||||
const uint64_t window_size = (tip && bottom_height) ? (tip->m_sidechainHeight - bottom_height + 1U) : m_chainWindowSize;
|
||||
|
||||
uint64_t block_depth = 0;
|
||||
const PoolBlock* cur = tip;
|
||||
|
|
Loading…
Reference in a new issue