Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiate lazy parsing of header and transactions in blocks #6

Open
stevenroose opened this issue Mar 12, 2014 · 0 comments
Open

Comments

@stevenroose
Copy link
Member

Currently, BitcoinSerialization has a _needInstance() method to indicate that parsing is required.

In blocks, however, parsing all transactions (even if done lazily), requires significantly more work than parsing only the header, while for many properties of the block, only the header is required.

Proposed solution:
Introduce a _needHeader() that only deserializes the header and indicates that the header has been deserialized so that following calls to this method will return.
Follow the same methods to ensure the serialization stays consistent => see BitcoinSerialization._needInstance().

The same for _needTransactions().

@stevenroose stevenroose added this to the alpha milestone Mar 12, 2014
@stevenroose stevenroose removed this from the alpha milestone Sep 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant