func (sm *StateManager) GetStateForHash(blockHash chainhash.Hash) (*primitives.State, bool) {
	sm.stateMapLock.RLock()
	derivedState, found := sm.stateMap[blockHash]
	sm.stateMapLock.RUnlock()
	if !found {
		return nil, false
	}
	derivedState.lock.Lock()
	defer derivedState.lock.Unlock()
	return derivedState.firstSlotState, true
}
// GetStateForHash gets the state for a certain block Hash.
GetStateForHash gets the state for a certain block Hash.
// GetStateForHash gets the state for a certain block Hash .
func (sm *StateManager) GetStateForHash(blockHash chainhash.Hash) (*primitives.State, bool) {
	sm.stateMapLock.RLock()
	derivedState, found := sm.stateMap[blockHash]
	sm.stateMapLock.RUnlock()
	if !found {
		return nil, false
	}
	derivedState.lock.Lock()
	defer derivedState.lock.Unlock()
	return derivedState.firstSlotState, true
}
func ( sm * StateManager ) GetStateForHash ( blockHash chainhash . Hash ) ( * primitives . State , bool ) { sm . stateMapLock . RLock ( ) derivedState , found := sm . stateMap [ blockHash ] sm . stateMapLock . RUnlock ( ) if ! found { return nil , false } derivedState . lock . Lock ( ) defer derivedState . lock . Unlock ( ) return derivedState . firstSlotState , true }
GetStateForHash gets the state for a certain block Hash.
GetStateForHash gets the state for a certain block Hash .