On 04/27/2017 11:09 PM, Leo Wandersleb wrote:

> So, if I have a wallet with birthday 100 and at time 200 want to add an
> address with date 198, I have to load all back from 100?

Yes.

> Now if I add an
> address with date 90, does the wallet update its "birthday" accordingly
> or do I have to also do something beyond the individual address creation
> dates?

The wallet calculates its birthdate automatically. Actually the wallet
birthdate isn't a persistent value but simply the minimum of all key and
seed birthdates in that wallet.

> How hard do you think it would be to improve bitcoinJ in that respect?

I'd say it's doable, but not trivial. Probably safest way to do this is
roll back (remove from wallet) transactions in the order latest to
oldest. At the same time, the block store would need to be rewound up to
the point where it is empty (it's a ring buffer).

> Do you see interest with others to implement something like that?

Good question. Replaying the chain (even parts of) should be rare. The
problem with removing transactions is also we loose all metadata (data
that doesn't come from the blockchain).

@all: What do others think about this one in particular?

> Do you see interest to merge it, if I implemented it with tests and all?

Yes, I think it would be useful.


-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to