Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: ArsenShnurkov on September 27, 2011, 04:07:09 PM



Title: rescan
Post by: ArsenShnurkov on September 27, 2011, 04:07:09 PM
How do bitcoin client determines duting rescan
which bitcoin addresses belongs to his wallet, and which are not?

Does he uses the list of adresses in the wallet itself,
or does he extracts addresses from the blockchain ?

Which lines of code should one see ?


Title: Re: rescan
Post by: casascius on September 27, 2011, 05:40:52 PM
I'm sure it must consult the wallet, and I remember there being an IsMine() in the code


Title: Re: rescan
Post by: Pieter Wuille on September 27, 2011, 06:02:54 PM
For each txout script encountered in the stored block chain, a test is done to verify whether our wallet is able to provide a matching txin script, or uses such a script as input. If so, it is added to the wallet.