func Transition(state csmt.TreeTransactionAccess, tx []byte, info ShardInfo) (*chainhash.Hash, error) {
	shard, err := NewShard(info.CurrentCode, []int64{}, state, info.ShardID)
	if err != nil {
		return nil, err
	}

	argContext, err := LoadArgumentContextFromTransaction(tx)
	if err != nil {
		return nil, err
	}

	out, err := shard.RunFunc(argContext)
	if err != nil {
		return nil, err
	}

	if out.(uint64) != 0 {
		return nil, fmt.Errorf("transaction failed with code: %d", out)
	}

	outHash, err := state.Hash()
	if err != nil {
		return nil, err
	}

	return outHash, nil
}
// Transition runs a transaction.
Transition runs a transaction.
// Transition runs a transaction .
func Transition(state csmt.TreeTransactionAccess, tx []byte, info ShardInfo) (*chainhash.Hash, error) {
	shard, err := NewShard(info.CurrentCode, []int64{}, state, info.ShardID)
	if err != nil {
		return nil, err
	}
	argContext, err := LoadArgumentContextFromTransaction(tx)
	if err != nil {
		return nil, err
	}
	out, err := shard.RunFunc(argContext)
	if err != nil {
		return nil, err
	}
	if out.(uint64) != 0 {
		return nil, fmt.Errorf("transaction failed with code: %d", out)
	}
	outHash, err := state.Hash()
	if err != nil {
		return nil, err
	}
	return outHash, nil
}
func Transition ( state csmt . TreeTransactionAccess , tx [ ] byte , info ShardInfo ) ( * chainhash . Hash , error ) { shard , err := NewShard ( info . CurrentCode , [ ] int64 { } , state , info . ShardID ) if err != nil { return nil , err } argContext , err := LoadArgumentContextFromTransaction ( tx ) if err != nil { return nil , err } out , err := shard . RunFunc ( argContext ) if err != nil { return nil , err } if out . ( uint64 ) != 0 { return nil , fmt . Errorf ( " " , out ) } outHash , err := state . Hash ( ) if err != nil { return nil , err } return outHash , nil }
Transition runs a transaction.
Transition runs a transaction .