Add mediantime to getblockchaininfo #7011

pull petertodd wants to merge 4 commits into bitcoin:master from petertodd:2015-11-add-mediantime-to-getblockchaininfo changing 2 files +11 −4
  1. petertodd commented at 9:39 PM on November 13, 2015: contributor

    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()

  2. Add mediantime field to getblockchaininfo RPC call
    Useful now that BIP113 is enforced for transactions entering the
    mempool. Was previously only (indirectly) available by calling
    getblocktemplate, a relatively expensive RPC call.
    748321eb5b
  3. Clarify nLockTime-by-time comment in CheckFinalTx() c277a63ed7
  4. gmaxwell commented at 9:42 PM on November 13, 2015: contributor

    Do we also want to add the value to the verbose getblock output?

  5. Document new mediantime field in getblockchaininfo 7259769d7f
  6. Add mediantime field to getblock and getblockheader 6531f17a78
  7. petertodd commented at 9:58 PM on November 13, 2015: contributor

    @gmaxwell Good idea; done.

  8. gmaxwell commented at 5:48 AM on November 14, 2015: 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?

  9. paveljanik commented at 7:07 AM on November 14, 2015: contributor

    ACK

  10. laanwj added the label RPC on Nov 14, 2015
  11. MarcoFalke commented at 5:29 PM on November 14, 2015: member

    utACK

  12. petertodd commented at 6:13 PM on November 14, 2015: contributor

    @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.

  13. gmaxwell commented at 8:39 PM on November 14, 2015: contributor

    Fair enough.

  14. gmaxwell commented at 10:01 PM on November 21, 2015: contributor

    ACK.

  15. gmaxwell merged this on Nov 21, 2015
  16. gmaxwell closed this on Nov 21, 2015

  17. gmaxwell referenced this in commit 31de2414c6 on Nov 21, 2015
  18. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me