-
Notifications
You must be signed in to change notification settings - Fork 36.5k
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
Add mediantime to getblockchaininfo #7011
Add mediantime to getblockchaininfo #7011
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.
Do we also want to add the value to the verbose getblock output? |
@gmaxwell Good idea; done. |
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? |
ACK |
utACK |
@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. |
Fair enough. |
ACK. |
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()