Skip to content

Differentiate lazy parsing of header and transactions in blocks #6

@stevenroose

Description

@stevenroose

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions