func (sr *ShardRelayer) GetStateKey(key chainhash.Hash) (chainhash.Hash, error) {
	var val chainhash.Hash
	_, state := sr.mempool.GetTipState()
	err := state.View(func(tx csmt.TreeDatabaseTransaction) error {
		v, err := tx.Get(key)
		if err != nil {
			return err
		}
		val = *v
		return nil
	})
	return val, err
}
// GetStateKey gets a key from state.
GetStateKey gets a key from state.
// GetStateKey gets a key from state .
func (sr *ShardRelayer) GetStateKey(key chainhash.Hash) (chainhash.Hash, error) {
	var val chainhash.Hash
	_, state := sr.mempool.GetTipState()
	err := state.View(func(tx csmt.TreeDatabaseTransaction) error {
		v, err := tx.Get(key)
		if err != nil {
			return err
		}
		val = *v
		return nil
	})
	return val, err
}
func ( sr * ShardRelayer ) GetStateKey ( key chainhash . Hash ) ( chainhash . Hash , error ) { var val chainhash . Hash _ , state := sr . mempool . GetTipState ( ) err := state . View ( func ( tx csmt . TreeDatabaseTransaction ) error { v , err := tx . Get ( key ) if err != nil { return err } val = * v return nil } ) return val , err }
GetStateKey gets a key from state.
GetStateKey gets a key from state .