func NewSyncManager(hostNode *p2p.HostNode, blockchain *Blockchain, mempool *Mempool) (*SyncManager, error) {
	sm := &SyncManager{
		hostNode:    hostNode,
		syncStarted: false,
		blockchain:  blockchain,
		mempool:     mempool,
	}

	ph, err := sm.registerHandlers()
	if err != nil {
		return nil, err
	}

	sm.protocol = ph

	return sm, nil
}
// NewSyncManager creates a new sync manager
NewSyncManager creates a new sync manager
// NewSyncManager creates a new sync manager
func NewSyncManager(hostNode *p2p.HostNode, blockchain *Blockchain, mempool *Mempool) (*SyncManager, error) {
	sm := &SyncManager{
		hostNode:    hostNode,
		syncStarted: false,
		blockchain:  blockchain,
		mempool:     mempool,
	}
	ph, err := sm.registerHandlers()
	if err != nil {
		return nil, err
	}
	sm.protocol = ph
	return sm, nil
}
func NewSyncManager ( hostNode * p2p . HostNode , blockchain * Blockchain , mempool * Mempool ) ( * SyncManager , error ) { sm := & SyncManager { hostNode : hostNode , syncStarted : false , blockchain : blockchain , mempool : mempool , } ph , err := sm . registerHandlers ( ) if err != nil { return nil , err } sm . protocol = ph return sm , nil }
NewSyncManager creates a new sync manager
NewSyncManager creates a new sync manager