bitcoin/BRWalletManager.c
//
// Periodicaly query the BRD backend to get current status (block number, nonce, balances,
// transactions and logs) The event will be NULL (as specified for a 'period dispatcher' - See
// `eventHandlerSetTimeoutDispatcher()`). This is called by the event handler thread.
//
Periodicaly query the BRD backend to get current status (block number, nonce, balances,
transactions and logs) The event will be NULL (as specified for a 'period dispatcher' - See
`eventHandlerSetTimeoutDispatcher()`). This is called by the event handler thread.
Periodicaly query the BRD backend to get current status ( block number nonce balances transactions and logs ) The event will be NULL ( as specified for a ' period dispatcher ' - See ` eventHandlerSetTimeoutDispatcher () ` ) . This is called by the event handler thread .
static void
bwmPeriodicDispatcher (BREventHandler handler,
                       BREventTimeout *event) {
    BRWalletManager bwm = (BRWalletManager) event->context;
    assert (eventHandlerIsCurrentThread (bwm->handler));
    if (0 == bwm->sleepWakeupsForSyncTickTock % BWM_SYNC_AFTER_WAKEUPS) {
        BRSyncManagerTickTock (bwm->syncManager);
    }
    else {
        BRSyncManagerP2PFullScanReport(bwm->syncManager);
    }
    bwm->sleepWakeupsForSyncTickTock += 1;
    bwm->sleepWakeupsForSyncTickTock %= BWM_SYNC_AFTER_WAKEUPS;
}
static void bwmPeriodicDispatcher ( BREventHandler handler , BREventTimeout * event ) { BRWalletManager bwm = ( BRWalletManager ) event -> context ; assert ( eventHandlerIsCurrentThread ( bwm -> handler ) ) ; if ( 0 == bwm -> sleepWakeupsForSyncTickTock % BWM_SYNC_AFTER_WAKEUPS ) { BRSyncManagerTickTock ( bwm -> syncManager ) ; } else { BRSyncManagerP2PFullScanReport ( bwm -> syncManager ) ; } bwm -> sleepWakeupsForSyncTickTock += 1 ; bwm -> sleepWakeupsForSyncTickTock %= BWM_SYNC_AFTER_WAKEUPS ; }
Periodicaly query the BRD backend to get current status (block number, nonce, balances,
transactions and logs) The event will be NULL (as specified for a 'period dispatcher' - See
`eventHandlerSetTimeoutDispatcher()`).
Periodicaly query the BRD backend to get current status ( block number nonce balances transactions and logs ) The event will be NULL ( as specified for a ' period dispatcher ' - See ` eventHandlerSetTimeoutDispatcher () ` ) .
// If BWM_SYNC_AFTER_WAKEUPS have occurred, then 'tick tock'. // Otherwise, if in P2P mode and in a full scan, report on progress