getrawtransaction: time = blocktime ? #12339

issue Mirobit opened this issue on February 2, 2018
  1. Mirobit commented at 9:12 PM on February 2, 2018: contributor

    Not sure if this is a bug or wanted behaviour:

    getrawtransaction rpc: " \"time\" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)\n"
    " \"blocktime\" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n"

    TxToJSON: entry.push_back(Pair("time", pindex->GetBlockTime())); entry.push_back(Pair("blocktime", pindex->GetBlockTime()));

    If you just read the help you would think time is the time the transaction entered the mempool (as show in the getmempoolentry rpc).

  2. fanquake added the label Docs on Feb 2, 2018
  3. fanquake added the label RPC/REST/ZMQ on Feb 2, 2018
  4. MarcoFalke deleted a comment on Feb 3, 2018
  5. laanwj commented at 6:25 PM on March 5, 2018: member

    Huh weird to report the same value twice. I can understand the confusion. I suppose people rely on this, so we cannot just change the API, but one could change the comment to make it clear that these are the same.

  6. promag commented at 7:07 PM on March 5, 2018: member

    It was introduced in #1393, and it sounds like it was added because WalletTxToJSON already had time = wtx.GetTxTime().

  7. jnewbery commented at 8:50 PM on April 3, 2018: member

    I think we should deprecate the "blocktime" return value and improve the help text for "time"

  8. promag commented at 9:05 PM on April 3, 2018: member

    @jnewbery I don't feel that way. WalletTxToJSON has time and blocktime, which have different values. It would be strange to have time instead of blocktime is this call. IMO we should aim for consistency in the response keys.

  9. jnewbery commented at 9:15 PM on April 3, 2018: member

    ah. Thanks @promag - makes sense.

    Then yes - updating the help text seems sufficient.

  10. promag commented at 9:24 PM on April 3, 2018: member

    updating the help text seems sufficient.

    For sure!

  11. MarcoFalke referenced this in commit ea0b1990d1 on Dec 28, 2018
  12. fanquake commented at 6:26 AM on January 27, 2019: member

    Fixed in #14981.

  13. fanquake closed this on Jan 27, 2019

  14. christiancfifi referenced this in commit db718907c4 on Aug 24, 2021
  15. christiancfifi referenced this in commit 8583a99307 on Aug 24, 2021
  16. christiancfifi referenced this in commit cf22be7a4c on Aug 25, 2021
  17. christiancfifi referenced this in commit af89aa9af0 on Aug 25, 2021
  18. christiancfifi referenced this in commit a0eceef952 on Aug 26, 2021
  19. christiancfifi referenced this in commit 4488338dce on Aug 28, 2021
  20. christiancfifi referenced this in commit 07601b8ec2 on Aug 29, 2021
  21. christiancfifi referenced this in commit 0d06956b17 on Aug 29, 2021
  22. christiancfifi referenced this in commit cf64b534ab on Aug 29, 2021
  23. christiancfifi referenced this in commit 6ff5ee82b1 on Sep 10, 2021
  24. christiancfifi referenced this in commit ba161184b6 on Sep 10, 2021
  25. christiancfifi referenced this in commit fec92b72e4 on Sep 10, 2021
  26. christiancfifi referenced this in commit 2aded545a2 on Sep 11, 2021
  27. christiancfifi referenced this in commit 89cc09515d on Sep 11, 2021
  28. DrahtBot locked this on Dec 16, 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