A little off topic, but when did the transaction dates stop being shown from the block timestamp and started being the timestamp at which the block was received? This bugs me because I do mental averages of generation, and only start the client every now and then, which then proceeds to download the blockchain pinning all new transactions under more or less the same date and time, i.e. now.
This still happens with 0.5.1, don't know if a bug or feature, it started somewhere on the 0.4 series and I always forget to report...
It is actually the time that the
transaction was received. Some older versions used that time
until it was confirmed, and then changed the timestamp to the block time. This caused listtransactions to change order. I agree this logic needs reworking to be sane in all scenarios. Perhaps something along these lines...
Requirements:
- The timestamp shown for a transaction should never change.
- New transactions should always have a timestamp no earlier than the transactions accounted for before it.
- THEREFORE, new transactions should never have future timestamps.
- listtransactions should preserve the order of transactions added.
Logic:
- If receiving a transaction outside a block, assign its timestamp to the current time.
- If receiving a block with a future timestamp, assign all its (not already known) transactions' timestamps to the current time.
- If receiving a block with a past timestamp, before the most recent known transaction (that we care about), assign all its (not already known) transactions' timestamps to the same timestamp as that most-recent-known transaction.
- If receiving a block with a past timestamp, but after the most recent known transaction, assign all its (not already known) transactions' timestamps to the block time.
Additionally, it might make sense to add 'first_seen' and 'block_time' to the information.
Anything I'm missing here?