@@ -244,15 +244,15 @@ static void BannedListChanged(ClientModel *clientmodel)
244
244
assert (invoked);
245
245
}
246
246
247
- static void BlockTipChanged (ClientModel* clientmodel, SynchronizationState sync_state, const uint256 block_hash, int height, int64_t blockTime , double verificationProgress, bool fHeader )
247
+ static void BlockTipChanged (ClientModel* clientmodel, SynchronizationState sync_state, interfaces::BlockTip tip , double verificationProgress, bool fHeader )
248
248
{
249
249
if (fHeader ) {
250
250
// cache best headers time and height to reduce future cs_main locks
251
- clientmodel->cachedBestHeaderHeight = height ;
252
- clientmodel->cachedBestHeaderTime = blockTime ;
251
+ clientmodel->cachedBestHeaderHeight = tip. block_height ;
252
+ clientmodel->cachedBestHeaderTime = tip. block_time ;
253
253
} else {
254
- clientmodel->m_cached_num_blocks = height ;
255
- WITH_LOCK (clientmodel->m_cached_tip_mutex , clientmodel->m_cached_tip_blocks = block_hash;);
254
+ clientmodel->m_cached_num_blocks = tip. block_height ;
255
+ WITH_LOCK (clientmodel->m_cached_tip_mutex , clientmodel->m_cached_tip_blocks = tip. block_hash ;);
256
256
}
257
257
258
258
// Throttle GUI notifications about (a) blocks during initial sync, and (b) both blocks and headers during reindex.
@@ -264,8 +264,8 @@ static void BlockTipChanged(ClientModel* clientmodel, SynchronizationState sync_
264
264
}
265
265
266
266
bool invoked = QMetaObject::invokeMethod (clientmodel, " numBlocksChanged" , Qt::QueuedConnection,
267
- Q_ARG (int , height ),
268
- Q_ARG (QDateTime, QDateTime::fromTime_t (blockTime )),
267
+ Q_ARG (int , tip. block_height ),
268
+ Q_ARG (QDateTime, QDateTime::fromTime_t (tip. block_time )),
269
269
Q_ARG (double , verificationProgress),
270
270
Q_ARG (bool , fHeader ),
271
271
Q_ARG (SynchronizationState, sync_state));
@@ -281,8 +281,8 @@ void ClientModel::subscribeToCoreSignals()
281
281
m_handler_notify_network_active_changed = m_node.handleNotifyNetworkActiveChanged (std::bind (NotifyNetworkActiveChanged, this , std::placeholders::_1));
282
282
m_handler_notify_alert_changed = m_node.handleNotifyAlertChanged (std::bind (NotifyAlertChanged, this ));
283
283
m_handler_banned_list_changed = m_node.handleBannedListChanged (std::bind (BannedListChanged, this ));
284
- m_handler_notify_block_tip = m_node.handleNotifyBlockTip (std::bind (BlockTipChanged, this , std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, false ));
285
- m_handler_notify_header_tip = m_node.handleNotifyHeaderTip (std::bind (BlockTipChanged, this , std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, true ));
284
+ m_handler_notify_block_tip = m_node.handleNotifyBlockTip (std::bind (BlockTipChanged, this , std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, false ));
285
+ m_handler_notify_header_tip = m_node.handleNotifyHeaderTip (std::bind (BlockTipChanged, this , std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, true ));
286
286
}
287
287
288
288
void ClientModel::unsubscribeFromCoreSignals ()
0 commit comments