Skip to content

followups: Various potential improvements arising out of chainman-deglobalizing review #21766

Description

@dongcarl

There are a few potential improvements mentioned by various reviewers of the chainman-deglobalizing work that are deserving of a tracking ticket, but are perhaps either not crucial to the main thrust of the work or the flaws already existed before the work. Let's discuss and collate them here so that we don't lose track of them!

  1. m_chain methods should perhaps require holding cs_main
  2. Ensure*() in src/rpc should be called at the top of functions to fail as early as possible
  3. IncrementExtraNonce does not need cs_main, and the locking scope can be limited
  4. CoinsDB.Cursor() passes ownership to caller and should return a std::unique_ptr
  5. Call to GetNetworkHashPS in getnetworkhashps contains many operators, which may increase risk of precedence bugs
  6. Avoid repeated calls to ActiveChain() where appropriate
  7. Review whether or not m_blockman member of ChainstateManager needs cs_main to be accessed
    • Various
  8. Review whether or not to support running bitcoin without a chainman
  9. Investigate how indexing interacts with CChainState

Please feel free to comment here for extra ones I've missed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions