Fixwalletdates #1991

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
4 participants

znort987 commented Nov 6, 2012

Add the fixwalletdates RPC

    When the client has been off for a while and gets restarted,
    new transactions are received via blockchain updates and get
    tagged with the current time, which bear little to no correlation
    with the time at which the TX was broadcast by the sender.

    As a substitute, the "fixwalletdates" RPC re-tags all wallet
    transactions with the timestamp of the block they are included
    in (if any).

    One minor downside of calling this RPC is that TX that were
    actually received via broadcast will see their "broadcast date"
    be replaced by the time they got included in a block.

    In practice, I've found this not to be a problem. In fact,
    seeing all TXs tagged with the time at which they get included
    in the blockchain makes more sense : in a way, it's the time the
    TX became valid, and if we have to pick one canonically representative
    time for a TX, first block inclusion time is better than first
    broadcast time.

Znort 987 added some commits Nov 6, 2012

Add the fixwalletdates RPC
    When the client has been off for a while and gets restarted,
    new transactions are received via blockchain updates and get
    tagged with the current time, which bear little to no correlation
    with the time at which the TX was broadcast by the sender.

    As a substitute, the "fixwalletdates" RPC re-tags all wallet
    transactions with the timestamp of the block they are included
    in (if any).

    One minor downside of calling this RPC is that TX that were
    actually received via broadcast will see their "broadcast date"
    be replaced by the time they got included in a block.

    In practice, I've found this not to be a problem. In fact,
    seeing all TXs tagged with the time at which they get included
    in the blockchain makes more sense : in a way, it's the time the
    TX became valid, and if we have to pick one canonically representative
    time for a TX, first block inclusion time is better than first
    broadcast time.
Member

luke-jr commented Nov 6, 2012

The problem you refer to was fixed in 0.7.1 already. Transactions received via block download are tagged with the block time now, except in unusual circumstances.

znort987 commented Nov 6, 2012

Yes, but what you describe only affects new transactions.
This pull request provides an RPC that cleans up all transactions, including older ones.

Member

luke-jr commented Nov 6, 2012

The first time you run 0.7, it should import the older ones intelligently...

Contributor

gavinandresen commented Nov 6, 2012

NACK: I'm against one-time-use RPC commands, especially for problems that we've solved.

Owner

laanwj commented Nov 7, 2012

Agreed@gavin. One-time fixes should be automatic or if it really needs to
be manual, a command-line arg. But this case should be already fixed...

znort987 commented Nov 7, 2012

This is indeed fixed now, and the RPC is not useful anymore. Closing

@znort987 znort987 closed this Nov 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment