3
For bitcoin-cli getblock, what's the difference between "time" and "mediantime"?
If i'm looking for a strictly increasing series of timestamps, is one better to choose than the other?
3
For bitcoin-cli getblock, what's the difference between "time" and "mediantime"?
If i'm looking for a strictly increasing series of timestamps, is one better to choose than the other?
4
mediantime is better for your purpose. The timestamp is chosen by the miners, and has some restrictions on it such as it can't be too far in the future/past (no more than 2 hours into the future), but it is not strictly increasing. Mediantime, on the other hand, is. Mediantime is the median time of the past 11 block timestamps, and a block must have a timestamp greater than that median time, so the mediantime always increases.