<p>It is referenced relatively, namely by using the parameter <code>BIP102HeightDelta</code>. The hardfork is 3 months after the block that Segwit was actived and the number of blocks after is equal to 90(days)*144(blocks/day)(<a href="https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/chainparams.cpp#L78" rel="nofollow noreferrer">https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/chainparams.cpp#L78</a>)  </p>

<p>Try to look for that parameter. It will show up that it is used here to define if the 3 months have passed to activate 2MB or not (<a href="https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/validation.cpp#L2934" rel="nofollow noreferrer">https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/validation.cpp#L2934</a> and <a href="https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/validation.cpp#L1853" rel="nofollow noreferrer">https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/validation.cpp#L1853</a> and <a href="https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/consensus/consensus.h#L24" rel="nofollow noreferrer">https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/consensus/consensus.h#L24</a>).</p>

CC BY-SA 3.0
2017-10-30T18:55:32.917Z
ooooh gotcha +1: thank you very much... I was surprised I couldn't find anything but didn't realize they were using a computation starting from the original segwit!
Cedric Martin
CC BY-SA 3.0
2017-10-30T17:42:37.160Z
2017-10-30T17:42:37.160Z
Bjarne Magnussen
<p>I read everywhere that segwit2x activates at blocks 494784, around 15 or 16 of November.</p>

<p>I did just checkout the segwit2x codebase doing:</p>

<pre><code>git clone https://github.com/btc1/bitcoin
</code></pre>

<p>And I can see that I'm on a branch called "segwit2x".</p>

<p>I tried to search every single file for any hint of block 494784, 494783 or 494785 but couldn't find anything.</p>

<p>I've got many technical questions regarding segwit2x and I wanted to dig into the source code to find answers.</p>

<p>Seen that I couldn't find anything, my first technical question is this one: where's the code related to block 494784 at which segwit2x is supposed to happen?</p>

<blockchain-fork><segwit2x><source-code>
Where's the code related to block 494784 for segwit2x?
Cedric Martin
# Where's the code related to block 494784 for segwit2x?

(Asked by: username_0 on 2017-10-30)

I read everywhere that segwit2x activates at blocks 494784, around 15 or 16 of November.
I did just checkout the segwit2x codebase doing:
git clone https://github.com/btc1/bitcoin

And I can see that I'm on a branch called "segwit2x".
I tried to search every single file for any hint of block 494784, 494783 or 494785 but couldn't find anything.
I've got many technical questions regarding segwit2x and I wanted to dig into the source code to find answers.
Seen that I couldn't find anything, my first technical question is this one: where's the code related to block 494784 at which segwit2x is supposed to happen?

**Tags:** blockchain-fork, segwit2x, source-code


---

## 1 answers

### Answer by username_1 on 2017-10-30. Score: 2 | Accepted answer

It is referenced relatively, namely by using the parameter `BIP102HeightDelta`. The hardfork is 3 months after the block that Segwit was actived and the number of blocks after is equal to 90(days)\*144(blocks/day)(<https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/chainparams.cpp#L78>)

Try to look for that parameter. It will show up that it is used here to define if the 3 months have passed to activate 2MB or not (<https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/validation.cpp#L2934> and <https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/validation.cpp#L1853> and <https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/consensus/consensus.h#L24>).

> **Comments:**
> **username_0**: ooooh gotcha +1: thank you very much... I was surprised I couldn't find anything but didn't realize they were using a computation starting from the original segwit!  

---

