Skip to content

Conversation

practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Jan 12, 2017

Previous to this commit the instance variable self.lastDate was not updated as expected in the method writeBlock(...) of the BlockDataCopier class. Instead the locally scoped variable lastDate was updated.

This resulted in self.lastDate being kept constant at its initial value datetime.datetime(2000, 1, 1) during the lifetime of the BlockDataCopier object, which in turn meant that the check ...

if self.timestampSplit and (blkDate > self.lastDate):

... was effectively reduced to ...

if self.timestampSplit:

... since self.lastDate was stuck at 2000-01-01.

…scoped variable lastDate)

Previous to this commit the instance variable self.lastDate was not
updated as expected in writeBlock(...). Instead the locally scoped
variable lastDate was updated.

This resulted in self.lastDate being kept constant at its initial
value datetime.datetime(2000, 1, 1) during the lifetime of the
BlockDataCopier object, which in turn meant that the check ...

    if self.timestampSplit and (blkDate > self.lastDate):

... was effectively reduced to ...

    if self.timestampSplit:

... since self.lastDate was stuck at 2000-01-01.
@jnewbery
Copy link
Contributor

ACK

@maflcko
Copy link
Member

maflcko commented Jan 18, 2017

ACK. Also ping @droark You might be interested in this fix.

@droark
Copy link
Contributor

droark commented Jan 18, 2017

@MarcoFalke - Thanks for the heads up.

@practicalswift - Have you tested this? I had to alter a few lines before the script worked as expected. (Granted, I hadn't tested the code in question, so thanks!) I can post the patch and you can squash the commit.

@practicalswift
Copy link
Contributor Author

practicalswift commented Jan 18, 2017

@droark Please post your patch and I'll incorporate it :-)

@droark
Copy link
Contributor

droark commented Jan 19, 2017

@practicalswift - Actually, since your patch just uncovers underlying issues, it's probably best for this PR to be closed and I file a larger PR that incorporates your fix. Cool?

@droark
Copy link
Contributor

droark commented Jan 19, 2017

@practicalswift - Filed #9580. This PR can be closed now. Thanks.

@laanwj
Copy link
Member

laanwj commented Jan 19, 2017

Thanks, closing in favor of #9580

@laanwj laanwj closed this Jan 19, 2017
@practicalswift practicalswift deleted the fix-bug-in-BlockDataCopier branch April 10, 2021 19:28
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants