Skip to content

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
@furszy furszy force-pushed the 2021_avoid_lookups branch from 9c36e20 to 58779a0 Compare January 14, 2022 01:03
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

@furszy
Copy link
Author

furszy commented Jan 15, 2022

nits tackled, moved NULL to nullptr keyword usage.

@furszy furszy force-pushed the 2021_avoid_lookups branch from 3f08f6d to dc930d4 Compare January 15, 2022 17:24
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