0

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.