Status: Tested and seems to work
- Guarantee listtransactions order consistency by storing a position for each entry
- Add “blocktime” and (for wallet transactions) “timereceived” to transaction Objects
- Implement “smart” times according to the following logic:
- If sending a transaction, assign its timestamp to the current time.
- 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.
This supercedes #1159. Discussion: https://bitcointalk.org/?topic=54527