func (sm *ShardStateManager) SetTip(newTipHash chainhash.Hash) error {
	sm.stateLock.Lock()
	defer sm.stateLock.Unlock()

	logrus.WithField("block hash", newTipHash).WithField("shard", sm.shardInfo.ShardID).Debug("new tip block action")

	newTip, found := sm.stateMap[newTipHash]
	if !found {
		return fmt.Errorf("couldn't find state root for tip: %s", newTipHash)
	}

	sm.tipDB = newTip

	return nil
}
// SetTip sets the tip of the state.
SetTip sets the tip of the state.
// SetTip sets the tip of the state .
func (sm *ShardStateManager) SetTip(newTipHash chainhash.Hash) error {
	sm.stateLock.Lock()
	defer sm.stateLock.Unlock()
	logrus.WithField("block hash", newTipHash).WithField("shard", sm.shardInfo.ShardID).Debug("new tip block action")
	newTip, found := sm.stateMap[newTipHash]
	if !found {
		return fmt.Errorf("couldn't find state root for tip: %s", newTipHash)
	}
	sm.tipDB = newTip
	return nil
}
func ( sm * ShardStateManager ) SetTip ( newTipHash chainhash . Hash ) error { sm . stateLock . Lock ( ) defer sm . stateLock . Unlock ( ) logrus . WithField ( " " , newTipHash ) . WithField ( " " , sm . shardInfo . ShardID ) . Debug ( " " ) newTip , found := sm . stateMap [ newTipHash ] if ! found { return fmt . Errorf ( " " , newTipHash ) } sm . tipDB = newTip return nil }
SetTip sets the tip of the state.
SetTip sets the tip of the state .