<blockquote>
  <p>getmininginfo or getdifficulty are useless as they return the difficulty of the most recently mined block, not the block that is currently being mined.</p>
</blockquote>

<p>The network difficulty is adjusted every 2016 blocks (~2 weeks), so to accomplish your goal (track the network difficulty) there is no need to continuously return the difficulty of every new block. It will only change once every 2016 blocks, so <code>getmininginfo</code> should do the trick.</p>

CC BY-SA 4.0
2019-09-01T23:31:13.973Z
2019-09-01T23:31:13.973Z
chytrik
<p><strong>Is there a way to make a getblocktemplate request that returns only the bits/target, or at least omits all of the pending transactions?</strong></p>

<p>I am interested in tracking the coin difficulty in real time. This requires a call to getblocktemplate and looking at the bits or the target. I make the call from a remote machine. This call can become very inefficient if there are a significant number of transactions in the blocktemplate, especially if I make the request every few seconds and there are megabytes of pending transactions.</p>

<p>getmininginfo or getdifficulty are useless as they return the difficulty of the most recently mined block, not the block that is currently being mined.</p>

<difficulty><getblocktemplate>
getblocktemplate request that omits transactions?
SDiv
# getblocktemplate request that omits transactions?

(Asked by: username_0 on 2019-09-01)

**Is there a way to make a getblocktemplate request that returns only the bits/target, or at least omits all of the pending transactions?**

I am interested in tracking the coin difficulty in real time. This requires a call to getblocktemplate and looking at the bits or the target. I make the call from a remote machine. This call can become very inefficient if there are a significant number of transactions in the blocktemplate, especially if I make the request every few seconds and there are megabytes of pending transactions.

getmininginfo or getdifficulty are useless as they return the difficulty of the most recently mined block, not the block that is currently being mined.

**Tags:** difficulty, getblocktemplate


---

## 1 answers

### Answer by username_1 on 2019-09-01. Score: 1

> getmininginfo or getdifficulty are useless as they return the difficulty of the most recently mined block, not the block that is currently being mined.

The network difficulty is adjusted every 2016 blocks (~2 weeks), so to accomplish your goal (track the network difficulty) there is no need to continuously return the difficulty of every new block. It will only change once every 2016 blocks, so `getmininginfo` should do the trick.


---

