func (sr *ShardRelayer) GetStateKeys(keys []chainhash.Hash) ([]chainhash.Hash, error) {
	vals := make([]chainhash.Hash, len(keys))
	_, state := sr.mempool.GetTipState()
	err := state.View(func(tx csmt.TreeDatabaseTransaction) error {
		for i, k := range keys {
			v, err := tx.Get(k)
			if err != nil {
				return err
			}
			vals[i] = *v
		}
		return nil
	})
	return vals, err
}
// GetStateKeys gets keys from state.
GetStateKeys gets keys from state.
// GetStateKeys gets keys from state .
func (sr *ShardRelayer) GetStateKeys(keys []chainhash.Hash) ([]chainhash.Hash, error) {
	vals := make([]chainhash.Hash, len(keys))
	_, state := sr.mempool.GetTipState()
	err := state.View(func(tx csmt.TreeDatabaseTransaction) error {
		for i, k := range keys {
			v, err := tx.Get(k)
			if err != nil {
				return err
			}
			vals[i] = *v
		}
		return nil
	})
	return vals, err
}
func ( sr * ShardRelayer ) GetStateKeys ( keys [ ] chainhash . Hash ) ( [ ] chainhash . Hash , error ) { vals := make ( [ ] chainhash . Hash , len ( keys ) ) _ , state := sr . mempool . GetTipState ( ) err := state . View ( func ( tx csmt . TreeDatabaseTransaction ) error { for i , k := range keys { v , err := tx . Get ( k ) if err != nil { return err } vals [ i ] = * v } return nil } ) return vals , err }
GetStateKeys gets keys from state.
GetStateKeys gets keys from state .