Skip to content

Initialization: out of order blocks #41

@dexX7

Description

@dexX7

To pick up the discussion of b1827eb and mastercoin-MSC#286:

With Bitcoin Core 0.10 there is a chance that blocks are stored out of order which can create unexpected behavior or crashes.

We are able to detect out of order stored blocks, but it is still not sure where this check should be done.

#40 moves the check and I tested it with empty datadir as well as a datadir with blocks, but a second test can't hurt.

One point I'm not sure about:

bool CheckForOutOfOrderBlockStorage()
{
    AssertLockHeld(cs_main);
    // ...
}

Is this lock usage correct? I tested it once with LOCK(cs_main); instead and it worked, but it's over my head.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions