func (sm *ShardManager) GetKey(key chainhash.Hash) (*chainhash.Hash, error) {

	_, state := sm.stateManager.GetTip()
	var out *chainhash.Hash
	err := state.View(func(tx csmt.TreeDatabaseTransaction) error {
		val, err := tx.Get(key)
		if err != nil {
			return err
		}
		out = val
		return nil
	})
	if err != nil {
		return nil, err
	}
	return out, nil
}
// GetKey gets a key from the current state.
GetKey gets a key from the current state.
// GetKey gets a key from the current state .
func (sm *ShardManager) GetKey(key chainhash.Hash) (*chainhash.Hash, error) {
	_, state := sm.stateManager.GetTip()
	var out *chainhash.Hash
	err := state.View(func(tx csmt.TreeDatabaseTransaction) error {
		val, err := tx.Get(key)
		if err != nil {
			return err
		}
		out = val
		return nil
	})
	if err != nil {
		return nil, err
	}
	return out, nil
}
func ( sm * ShardManager ) GetKey ( key chainhash . Hash ) ( * chainhash . Hash , error ) { _ , state := sm . stateManager . GetTip ( ) var out * chainhash . Hash err := state . View ( func ( tx csmt . TreeDatabaseTransaction ) error { val , err := tx . Get ( key ) if err != nil { return err } out = val return nil } ) if err != nil { return nil , err } return out , nil }
GetKey gets a key from the current state.
GetKey gets a key from the current state .