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

netsync: Split blockmanager into separate package. #2500

Merged
merged 6 commits into from
Dec 15, 2020

Commits on Dec 15, 2020

  1. server: Rename blockManager field to syncManager.

    This renames the field that houses the block manager to syncManager to
    more accurately reflect its purpose and updates comments accordingly.
    
    This is part of an overall effort to split the block manager out into a
    separate internal netsync package.
    davecgh committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    3832c4b View commit details
    Browse the repository at this point in the history
  2. multi: Rename BMGR subsystem to SYNC.

    This renames the block manager logging subsystem from BMGR to SYNC and
    updates all related documentation accordingly.
    
    This is part of an overall effort to split the block manager out into a
    separate internal netsync package.
    davecgh committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    25fbc14 View commit details
    Browse the repository at this point in the history
  3. server: Add temp sync manager interface.

    This adds a temporary sync manager interface to facilitate cleaner diffs
    when moving the block manager to a new package.
    
    This is part of an overall effort to split the block manager out into a
    separate internal netsync package.
    davecgh committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    f20f1d5 View commit details
    Browse the repository at this point in the history
  4. netsync: Split blockmanager into separate package.

    This does the minimum work necessary to refactor the block manager into
    its own internal package named netsync.  The main motivation is that
    separating this code into its own package will improve its testability
    and more cleanly split the details related to syncing with the network
    from consensus validation.
    
    The API will certainly need some additional cleanup and changes to make
    it more usable outside of the specific circumstances it currently
    supports, however it is better to do that in future commits in order to
    keep the changeset as small as possible during this refactor.
    
    Overview of the major changes:
    
    - Create the new package
    - Move blockmanager.go -> internal/netsync/manager.go
    - Update logging to use the new netsync package logger
    - Rename blockManagerConfig to Config (now netsync.Config)
    - Move peerNotifier to netsync/interface.go (now netsync.PeerNotifier)
    - Move syncManager to netsync/interface.go (now netsync.SyncManager)
    - Rename newBlockManager to New (now netsync.New)
    - Update all references to the block manager to use the package
    - Add package logger
    - Initialize new package logger with sync logger
    davecgh committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    1229cc3 View commit details
    Browse the repository at this point in the history
  5. netsync: Rename blockManager to SyncManager.

    This removes the temporary netsync.SyncManager interface that was added
    to facilitate refactoring the block manager to the new netsync package
    and renames the blockManager struct to SyncManager so it is exported.
    
    It also updates callers to use the concrete struct versus the removed
    interface.
    davecgh committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    4a9380c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e7a3670 View commit details
    Browse the repository at this point in the history