-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rpc] getblock
result is missing chainwork
#413
Comments
Thanks for reporting. That was a more recent addition to BC and not something we currently store or have access to because our chain index is dynamically created at start-up and pruned during operation. This helps reduce memory usage as, in practice, you never really need the chain index nodes prior to the last retarget interval (however they are dynamically loaded and the chain work adjusted accordingly if needed, but in practice, nothing on the main network is going to fork that far back anyways...). As a result, our chainwork starts from 0 for whatever the oldest generated chain index is on each start-up. The reason this isn't an issue is because the important part for keeping track of the work is the relative figures across multiple chain branches (forks). So long as the parent of those chains start at the same value, its actual value is irrelevant. That said, we'll probably end up keeping a running work total in the metadata as a part of the upcoming chain updates to accommodate the changes required by the database2 pull request (#380) at which point we could potentially expose the field. However, I don't imagine anyone is actually using it for anything more than a fun fact. |
Yes - I certainly never did. Just thought reporting it might save someone depending on it some time... |
getblock
result is missing chainwork
getblock
result is missing chainwork
Looks like this was fixed in #1484 |
The
getblock
RPC call is missing thechainwork
attribute in its result.I just noticed this when comparing the results from btcd and bitcoin core in-system.
Not that I need it, but , so I figured I post a note in any case. :)
The text was updated successfully, but these errors were encountered: