Add mediantime to getblockchaininfo#7011
Merged
gmaxwell merged 4 commits intobitcoin:masterfrom Nov 21, 2015
Merged
Conversation
Useful now that BIP113 is enforced for transactions entering the mempool. Was previously only (indirectly) available by calling getblocktemplate, a relatively expensive RPC call.
Contributor
|
Do we also want to add the value to the verbose getblock output? |
Contributor
Author
|
@gmaxwell Good idea; done. |
Contributor
|
Tested ACK.. but a question: are people going to get confused when they see median time in getblock output, but the nlock time thats enforced there is the mediantimepast? |
Contributor
|
ACK |
Member
|
utACK |
Contributor
Author
|
@gmaxwell They probably will be. OTOH, they can always check the mediantime for the previous block. Also, this way avoids the special case for the genesis block. edit: Also, if it's the mediantimepast, how do I get the mediantime for the current block? I'd have to special-case calling getblockchaininfo, and that might refer to a newer block than I was expecting. |
Contributor
|
Fair enough. |
Contributor
|
ACK. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Useful now that BIP113 is enforced for transactions entering the mempool. Was previously only (indirectly) available by calling getblocktemplate, a relatively expensive RPC call.
Also, clarified a comment in CheckFinalTx()