<p>Yes, this is by design.</p>

<p>The notify action is run in the function <code>BlockNotifyCallback</code> (<code>init.cpp</code>), and you can see:</p>

<pre><code>static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex)
{
    if (initialSync || !pBlockIndex)
        return;
    // ...
}
</code></pre>

<p>The <code>initialSync</code> argument comes from the return value of <code>IsInitialBlockDownload()</code> (in <code>validate.cpp</code>).  It checks several things to determine if the initial block download is ongoing.  Probably the operative one here is a check whether the most recent known block has a timestamp that is more than 24 hours earlier than the current system time.</p>

<p>So it appears you will start getting notifications when you are 24 hours behind or less.</p>

CC BY-SA 3.0
2017-01-21T05:08:36.733Z
2017-01-21T05:08:36.733Z
Nate Eldredge
<p>My node is way behind and I noticed the <code>-blocknoitfy</code> action specified in <code>bitcoin.conf</code> is not being triggered. Which is OK for now, because the node has so much catching up to do, the script wouldn't do any good anyway.</p>

<p>Is this correct behavior? At what point does <code>blocknotify</code> start triggering again? My experience is that after a few hours or even a day of downtime, it gets triggered for every block during catch-up (so it could be a dozen triggers all at once, for example)</p>

<synchronization><bitcoin.conf>
Is -blocknotify triggered during catch-up?
pinhead
# Is -blocknotify triggered during catch-up?

(Asked by: username_0 on 2017-01-20)

My node is way behind and I noticed the `-blocknoitfy` action specified in `bitcoin.conf` is not being triggered. Which is OK for now, because the node has so much catching up to do, the script wouldn't do any good anyway.

Is this correct behavior? At what point does `blocknotify` start triggering again? My experience is that after a few hours or even a day of downtime, it gets triggered for every block during catch-up (so it could be a dozen triggers all at once, for example)

**Tags:** synchronization, bitcoin.conf


---

## 1 answers

### Answer by username_1 on 2017-01-21. Score: 6 | Accepted answer

Yes, this is by design.

The notify action is run in the function `BlockNotifyCallback` (`init.cpp`), and you can see:

```
static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex)
{
    if (initialSync || !pBlockIndex)
        return;
    // ...
}

```

The `initialSync` argument comes from the return value of `IsInitialBlockDownload()` (in `validate.cpp`). It checks several things to determine if the initial block download is ongoing. Probably the operative one here is a check whether the most recent known block has a timestamp that is more than 24 hours earlier than the current system time.

So it appears you will start getting notifications when you are 24 hours behind or less.


---

