Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: ShadowOfHarbringer on October 17, 2010, 10:59:42 AM



Title: How often is hash counter updated ? Does closing the client save current state ?
Post by: ShadowOfHarbringer on October 17, 2010, 10:59:42 AM
Hey,

As I understand, the client is doing the hashing in an organized manner, based on some counter. I mean that when i close the client, it saves the current state, so it can continue just where it left last time. Am i right ?

I was wondering how often is the client doing backup of current state in its database, because in an event on sudden power failure, they client could forget where it was and waste some amount of time doing the same work twice when it is turned on later. Is that the case ? Or is the counter saved in real time ?

So If I hard-reset my computer or kill the client with -9 parameter and then restart the client, will it pick up hashing exactly where it left, or will it start some stage from the beginning ?

I hope i made myself clear enough, because my english surely isn't perfect.


Title: Re: How often is hash counter updated ? Does closing the client save current state ?
Post by: tcatm on October 17, 2010, 11:02:22 AM
It doesn't matter where your client resumes hashing. Chances for finding a block are the same.


Title: Re: How often is hash counter updated ? Does closing the client save current state ?
Post by: ShadowOfHarbringer on October 17, 2010, 11:06:02 AM
It doesn't matter where your client resumes hashing. Chances for finding a block are the same.

Even if it repeats exactly the same work that has been done before ? Curious.


Title: Re: How often is hash counter updated ? Does closing the client save current state ?
Post by: tcatm on October 17, 2010, 11:10:33 AM
It won't repeat work. It'll create a new block to work on and this block will be different from the last one.