Author

Topic: RPC method to determine nBlocktime? (Read 499 times)

staff
Activity: 4284
Merit: 8808
November 15, 2016, 06:01:47 AM
#2
In order to determine the current block height one can call getblockcount but I see no equivalent in order to determine the value used for nBlocktime (the average time of the last six blocks if I recall correctly).
When determining when a CLTV transaction is going to be "ready to send" (without actually attempting to send it) this would be helpful.
Or is there already a method to determine this from RPC calls?


$ ~/bitcoin/src/bitcoin-cli getblockchaininfo
{
  "chain": "main",
  "blocks": 439009,
  "headers": 439009,
  "bestblockhash": "0000000000000000004b21e8d764c7b8d46cdda8d65de23f16ff2a0124ca9070",
  "difficulty": 254620187304.0614,
  "mediantime": 1479204735,
  "verificationprogress": 0.9999974299335723,
  "chainwork": "0000000000000000000000000000000000000000002eb229f12576c1dbb64496",
  "pruned": false,
  "softforks": [
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
November 15, 2016, 03:50:28 AM
#1
In order to determine the current block height one can call getblockcount but I see no equivalent in order to determine the value used for nBlocktime (the average time of the last six blocks if I recall correctly).

When determining when a CLTV transaction is going to be "ready to send" (without actually attempting to send it) this would be helpful.

Or is there already a method to determine this from RPC calls?
Jump to: