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

[Refactor] Add LookupBlockIndex #2715

Merged
merged 3 commits into from
Jan 19, 2022
Merged

Conversation

furszy
Copy link

@furszy furszy commented Jan 8, 2022

Adaptation of 92fabcd for our sources.

Replacing all mapBlockIndex lookups with a new LookupBlockIndex(). In some cases it avoids a second lookup.

@furszy furszy self-assigned this Jan 8, 2022
@furszy furszy changed the title [WIP][Refactor] Add LookupBlockIndex [Refactor] Add LookupBlockIndex Jan 9, 2022
promag and others added 2 commits January 13, 2022 22:01
random-zebra
random-zebra previously approved these changes Jan 14, 2022
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. ACK 58779a0

src/net_processing.cpp Outdated Show resolved Hide resolved
src/net_processing.cpp Outdated Show resolved Hide resolved
src/net_processing.cpp Outdated Show resolved Hide resolved
@furszy
Copy link
Author

furszy commented Jan 15, 2022

nits tackled, moved NULL to nullptr keyword usage.

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK dc930d4

@random-zebra random-zebra added this to the 6.0.0 milestone Jan 18, 2022
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK dc930d4

@furszy furszy merged commit fda28bd into PIVX-Project:master Jan 19, 2022
furszy added a commit that referenced this pull request Jan 23, 2022
…ernalBlockFile

5ca8e22 QA: Fix cs_main lock in evo_deterministicmns_tests (random-zebra)
3efd1b5 Trivial: fix wrong function name in logs (random-zebra)
9b4aacf BUG: fix missing cs_main lock in AppInitMain and LoadExternalBlockFile (random-zebra)

Pull request description:

  #2715 introduced a locking assertion in `InsertBlockIndex`, which is currently failing (with debug enabled) because `cs_main` is not held during the blockindex load in `AppInitMain` (bitcoin@c651df8).
  Also, `LookupBlockIndex` is being called without cs_main in `LoadExternalBlockFile` (bitcoin@f814a3e).
  Finally there's a couple of missing locks in rest.cpp (which can be removed later, porting bitcoin#12151).

ACKs for top commit:
  Fuzzbawls:
    ACK 5ca8e22
  Fuzzbawls:
    ACK 5ca8e22
  furszy:
    Code ACK 5ca8e22
  furszy:
    k, ACK 5ca8e22 and merging..

Tree-SHA512: 8775f40ffee94ca804fccffac1447bc258d6f810c601c2a8a27f3d5314c526881460a0fece903317fb9073f2d08961c3c16e9fb2a74c285db4d4b6e6028c0981
@Fuzzbawls Fuzzbawls modified the milestones: 6.0.0, 5.5.0 Sep 11, 2022
@furszy furszy deleted the 2021_avoid_lookups branch November 29, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants