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

multi: Handle chain ntfn callback in server. #2498

Merged
merged 3 commits into from
Dec 15, 2020

Commits on Dec 15, 2020

  1. Configuration menu
    Copy the full SHA
    48fcfe9 View commit details
    Browse the repository at this point in the history
  2. blockmanager: Rework chain current logic.

    This reworks that logic that determines whether or not the block manager
    believes the chain is current (synced) to use a flag that is protected
    by a separate mutex and is updated on the fly versus needing to go
    through a channel and using the current sync peer.
    
    While the primary objective is to decouple the block manager from the
    server so it can be split out into a separate internal netsync package,
    this also has the benefit of much faster state querying and allowing
    looser coupling of block processing without the potential of deadlocks.
    davecgh committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    de915de View commit details
    Browse the repository at this point in the history
  3. multi: Handle chain ntfn callback in server.

    This further decouples the block manager from the server by moving the
    chain callback code from the block manager to server where it more
    naturally belongs since it is not directly related to sync, rather it is
    in response to it.
    
    The following is a high level overview of the changes:
    - Move blockchain notification callback to server
      - Use instance vars and methods directly on server
    - Move funcs and consts only used by callback from blockmanager.go to server.go
    - Remove no longer needed methods from peerNotifier interface
      - RelayInventory
      - TransactionConfirmed
    - Remove no longer needed fields from blockManagerConfig struct
      - FeeEstimator
      - BgBlkTmplGenerator
      - NotifyWinningTickets
      - PruneRebroadcastInventory
    - Move lottery data duplicate filter state to server
    - Move block announce duplicate filter state to server
    - Misc consistency nits
    
    This is a part of the overall effort to decouple the block manager from
    the server so it can be split out into a separate internal netsync
    package.
    davecgh committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    ccd41c7 View commit details
    Browse the repository at this point in the history