func NewStateManager(c *config.Config, genesisTime uint64, blockchain *Blockchain, db db.Database) (*StateManager, error) {
	s := &StateManager{
		config:       c,
		stateMap:     make(map[chainhash.Hash]*stateDerivedFromBlock),
		stateMapLock: new(sync.RWMutex),
		stateLock:    new(sync.Mutex),
		genesisTime:  genesisTime,
		blockchain:   blockchain,
		db:           db,
	}
	return s, nil
}
// NewStateManager creates a new state manager.
NewStateManager creates a new state manager.
// NewStateManager creates a new state manager .
func NewStateManager(c *config.Config, genesisTime uint64, blockchain *Blockchain, db db.Database) (*StateManager, error) {
	s := &StateManager{
		config:       c,
		stateMap:     make(map[chainhash.Hash]*stateDerivedFromBlock),
		stateMapLock: new(sync.RWMutex),
		stateLock:    new(sync.Mutex),
		genesisTime:  genesisTime,
		blockchain:   blockchain,
		db:           db,
	}
	return s, nil
}
func NewStateManager ( c * config . Config , genesisTime uint64 , blockchain * Blockchain , db db . Database ) ( * StateManager , error ) { s := & StateManager { config : c , stateMap : make ( map [ chainhash . Hash ] * stateDerivedFromBlock ) , stateMapLock : new ( sync . RWMutex ) , stateLock : new ( sync . Mutex ) , genesisTime : genesisTime , blockchain : blockchain , db : db , } return s , nil }
NewStateManager creates a new state manager.
NewStateManager creates a new state manager .