mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-20 08:38:41 +02:00
call onNewBlock() iff listener registered
This commit is contained in:
@@ -51,10 +51,12 @@ namespace monero {
|
||||
|
||||
virtual void on_new_block(uint64_t height, const cryptonote::block& cnBlock) {
|
||||
|
||||
// notify listeners of block
|
||||
MoneroBlock block;
|
||||
block.height = height;
|
||||
listener->onNewBlock(block);
|
||||
// notify listener of block
|
||||
if (this->listener != nullptr) {
|
||||
MoneroBlock block;
|
||||
block.height = height;
|
||||
listener->onNewBlock(block);
|
||||
}
|
||||
|
||||
// notify listeners of sync progress
|
||||
if (syncStartHeight != nullptr && height > *syncStartHeight) {
|
||||
|
||||
Reference in New Issue
Block a user