<p>See the variable <code>nTargetSpacing</code>.  The difficulty adjustments will try to steer the average block time towards this value (in seconds).</p>

<p>You can't change this at runtime.  In fact, you can't easily change it at all once you've released your coin.  All clients on the network need to agree on this number, since it is used to calculate the required difficulty.  If you change it after release, then there will be a disagreement between old and new clients as to whether various blocks are valid, and your coin will have a <a href="https://bitcoin.stackexchange.com/questions/9173/what-is-a-hardfork">hard fork</a>.</p>

CC BY-SA 3.0
2014-05-06T00:17:34.157Z
2014-05-06T00:17:34.157Z
2017-04-13T12:47:32.940Z
Nate Eldredge
<p>When Creating an Altcoin for fun, what variable/attribute do I change in main.cpp file to increase/lower the time it takes for confirmations to take place?</p>

<p>Also can the confirmation times be changed again after coin is re-compiled/re-built?</p>

<p>Thanks.</p>

<alternatives><confirmations><altcoin>
Creating An Altcoin: How to Lower or Increase Confirmation Times?
bithog
# Creating An Altcoin: How to Lower or Increase Confirmation Times?

(Asked by: username_0 on 2014-05-05)

When Creating an Altcoin for fun, what variable/attribute do I change in main.cpp file to increase/lower the time it takes for confirmations to take place?

Also can the confirmation times be changed again after coin is re-compiled/re-built?

Thanks.

**Tags:** alternatives, confirmations, altcoin


---

## 1 answers

### Answer by username_1 on 2014-05-06. Score: 1

See the variable `nTargetSpacing`. The difficulty adjustments will try to steer the average block time towards this value (in seconds).

You can't change this at runtime. In fact, you can't easily change it at all once you've released your coin. All clients on the network need to agree on this number, since it is used to calculate the required difficulty. If you change it after release, then there will be a disagreement between old and new clients as to whether various blocks are valid, and your coin will have a [hard fork](https://bitcoin.stackexchange.com/questions/9173/what-is-a-hardfork).


---

