Rename :ignore to :no_fees_transaction everywhere
MODIFY
apps/omg/lib/omg/fees.ex
apps/omg/lib/omg/fees.ex
@@ -17,7 +17,6 @@ defmodule OMG.Fees do
Transaction's fee validation functions.
"""
- alias OMG.FeesValidator
alias OMG.MergeTransactionValidator
alias OMG.State.Transaction
alias OMG.Utxo

MODIFY
apps/omg/lib/omg/state/transaction/validator.ex
apps/omg/lib/omg/state/transaction/validator.ex
@@ -20,7 +20,6 @@ defmodule OMG.State.Transaction.Validator do
@maximum_block_size 65_536
alias OMG.Fees
- alias OMG.FeesValidator
alias OMG.State.Core
alias OMG.State.Transaction
alias OMG.State.UtxoSet

MODIFY
apps/omg/test/omg/state/core_test.exs
apps/omg/test/omg/state/core_test.exs
@@ -43,9 +43,9 @@ defmodule OMG.State.CoreTest do
test "can spend deposits", %{alice: alice, bob: bob, state_empty: state} do
state
|> do_deposit(alice, %{amount: 10, currency: @eth, blknum: 1})
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :no_fees_transaction)
|> success?
- |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{bob, 3}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{bob, 3}]), :no_fees_transaction)
|> success?
end
@@ -55,19 +55,19 @@ defmodule OMG.State.CoreTest do
state1 =
state
|> do_deposit(alice, %{amount: 10, currency: @not_eth, blknum: 1})
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @not_eth, [{alice, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @not_eth, [{alice, 7}, {alice, 3}]), :no_fees_transaction)
|> success?
state1
- |> Core.exec(create_recovered([{1000, 0, 0, alice}], @eth, [{alice, 9}]), :ignore)
+ |> Core.exec(create_recovered([{1000, 0, 0, alice}], @eth, [{alice, 9}]), :no_fees_transaction)
|> fail?(:amounts_do_not_add_up)
state1
- |> Core.exec(create_recovered([{1000, 0, 0, alice}], [{alice, @eth, 9}, {alice, @not_eth, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1000, 0, 0, alice}], [{alice, @eth, 9}, {alice, @not_eth, 3}]), :no_fees_transaction)
|> fail?(:amounts_do_not_add_up)
state1
- |> Core.exec(create_recovered([{1000, 0, 0, alice}], [{alice, @not_eth, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1000, 0, 0, alice}], [{alice, @not_eth, 3}]), :no_fees_transaction)
|> success?
end
@@ -78,10 +78,10 @@ defmodule OMG.State.CoreTest do
# outputs exceed inputs, no fee
state =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 8}, {bob, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 8}, {bob, 3}]), :no_fees_transaction)
|> fail?(:amounts_do_not_add_up)
|> same?(state)
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 2}, {alice, 8}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 2}, {alice, 8}]), :no_fees_transaction)
|> success?
# outputs exceed inputs, with fee
@@ -93,13 +93,13 @@ defmodule OMG.State.CoreTest do
|> same?(state)
|> Core.exec(
create_recovered([{@blknum1, 0, 0, bob}, {@blknum1, 0, 1, alice}], @eth, [{alice, 9}, {bob, 2}]),
- :ignore
+ :no_fees_transaction
)
|> fail?(:amounts_do_not_add_up)
|> same?(state)
|> Core.exec(
create_recovered([{@blknum1, 0, 0, bob}, {@blknum1, 0, 1, alice}], @eth, [{alice, 7}, {bob, 2}]),
- :ignore
+ :no_fees_transaction
)
|> success?()
end
@@ -218,7 +218,7 @@ defmodule OMG.State.CoreTest do
|> do_deposit(alice, %{amount: 2, currency: @not_eth, blknum: 2})
|> Core.exec(
create_recovered([{1, 0, 0, alice}, {2, 0, 0, alice}], [{bob, @eth, 1}, {bob, @not_eth, 2}]),
- :ignore
+ :no_fees_transaction
)
|> success?
end
@@ -229,9 +229,9 @@ defmodule OMG.State.CoreTest do
state
|> do_deposit(alice, %{amount: 10, currency: @eth, blknum: 1})
|> do_deposit(bob, %{amount: 20, currency: @eth, blknum: 2})
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 10}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 10}]), :no_fees_transaction)
|> success?
- |> Core.exec(create_recovered([{2, 0, 0, bob}], @eth, [{alice, 20}]), :ignore)
+ |> Core.exec(create_recovered([{2, 0, 0, bob}], @eth, [{alice, 20}]), :no_fees_transaction)
|> success?
end
@@ -241,7 +241,7 @@ defmodule OMG.State.CoreTest do
state
|> do_deposit(alice, %{amount: 10, currency: @eth, blknum: 1})
|> do_deposit(bob, %{amount: 20, currency: @eth, blknum: 2})
- |> Core.exec(create_recovered([{1, 0, 0, bob}, {2, 0, 0, alice}], @eth, [{bob, 10}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, bob}, {2, 0, 0, alice}], @eth, [{bob, 10}]), :no_fees_transaction)
|> fail?(:unauthorized_spent)
end
@@ -268,7 +268,7 @@ defmodule OMG.State.CoreTest do
state_deposit = state |> do_deposit(alice, %{amount: 10, currency: @eth, blknum: 1})
state_deposit
- |> Core.exec(create_recovered([{1, 1, 0, alice}, {1, 0, 0, alice}], @eth, [{bob, 7}]), :ignore)
+ |> Core.exec(create_recovered([{1, 1, 0, alice}, {1, 0, 0, alice}], @eth, [{bob, 7}]), :no_fees_transaction)
|> fail?(:utxo_not_found)
|> same?(state_deposit)
end
@@ -276,10 +276,10 @@ defmodule OMG.State.CoreTest do
@tag fixtures: [:alice, :bob, :state_alice_deposit]
test "can't spend other people's funds", %{alice: alice, bob: bob, state_alice_deposit: state} do
state
- |> Core.exec(create_recovered([{1, 0, 0, bob}], @eth, [{bob, 8}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, bob}], @eth, [{bob, 8}, {alice, 3}]), :no_fees_transaction)
|> fail?(:unauthorized_spent)
|> same?(state)
- |> Core.exec(create_recovered([{1, 0, 0, bob}], @eth, [{alice, 10}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, bob}], @eth, [{alice, 10}]), :no_fees_transaction)
|> fail?(:unauthorized_spent)
|> same?(state)
end
@@ -288,19 +288,19 @@ defmodule OMG.State.CoreTest do
test "all inputs must be authorized to be spent", %{alice: alice, bob: bob, state_alice_deposit: state} do
state =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :no_fees_transaction)
|> success?()
state
- |> Core.exec(create_recovered([{@blknum1, 0, 0, bob}, {@blknum1, 0, 1, bob}], @eth, []), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 0, bob}, {@blknum1, 0, 1, bob}], @eth, []), :no_fees_transaction)
|> fail?(:unauthorized_spent)
|> same?(state)
- |> Core.exec(create_recovered([{@blknum1, 0, 0, alice}, {@blknum1, 0, 1, alice}], @eth, []), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 0, alice}, {@blknum1, 0, 1, alice}], @eth, []), :no_fees_transaction)
|> fail?(:unauthorized_spent)
|> same?(state)
state
- |> Core.exec(create_recovered([{@blknum1, 0, 0, bob}, {@blknum1, 0, 1, alice}], @eth, []), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 0, bob}, {@blknum1, 0, 1, alice}], @eth, []), :no_fees_transaction)
|> success?()
end
@@ -313,7 +313,7 @@ defmodule OMG.State.CoreTest do
for first <- transactions,
second <- transactions do
- state |> Core.exec(first, :ignore) |> success? |> Core.exec(second, :ignore) |> fail?(:utxo_not_found)
+ state |> Core.exec(first, :no_fees_transaction) |> success? |> Core.exec(second, :no_fees_transaction) |> fail?(:utxo_not_found)
end
end
@@ -325,13 +325,13 @@ defmodule OMG.State.CoreTest do
state_alice_deposit: state
} do
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :no_fees_transaction)
|> success?
- |> Core.exec(create_recovered([{@blknum1, 0, 0, bob}], @eth, [{carol, 7}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 0, bob}], @eth, [{carol, 7}]), :no_fees_transaction)
|> success?
- |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{carol, 3}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{carol, 3}]), :no_fees_transaction)
|> success?
- |> Core.exec(create_recovered([{@blknum1, 1, 0, carol}, {@blknum1, 2, 0, carol}], @eth, [{alice, 10}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 1, 0, carol}, {@blknum1, 2, 0, carol}], @eth, [{alice, 10}]), :no_fees_transaction)
|> success?
end
@@ -341,9 +341,9 @@ defmodule OMG.State.CoreTest do
{:ok, {_, _, _}, state} = form_block_check(state)
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :no_fees_transaction)
|> success?
- |> Core.exec(create_recovered([{next_block_height, 0, 0, bob}], @eth, [{bob, 7}]), :ignore)
+ |> Core.exec(create_recovered([{next_block_height, 0, 0, bob}], @eth, [{bob, 7}]), :no_fees_transaction)
|> success?
end
@@ -353,11 +353,11 @@ defmodule OMG.State.CoreTest do
{:ok, {_, _, _}, state} =
state
- |> Core.exec(recovered, :ignore)
+ |> Core.exec(recovered, :no_fees_transaction)
|> success?
|> form_block_check()
- Core.exec(state, recovered, :ignore) |> fail?(:utxo_not_found) |> same?(state)
+ Core.exec(state, recovered, :no_fees_transaction) |> fail?(:utxo_not_found) |> same?(state)
end
@tag fixtures: [:alice, :bob, :state_alice_deposit]
@@ -367,9 +367,9 @@ defmodule OMG.State.CoreTest do
assert {:ok, {%Block{hash: block_hash, number: block_number}, triggers, _}, _} =
state
- |> Core.exec(recover1, :ignore)
+ |> Core.exec(recover1, :no_fees_transaction)
|> success?
- |> Core.exec(recover2, :ignore)
+ |> Core.exec(recover2, :no_fees_transaction)
|> success?
|> form_block_check()
@@ -385,7 +385,7 @@ defmodule OMG.State.CoreTest do
assert state =
state
- |> Core.exec(recover1, :ignore)
+ |> Core.exec(recover1, :no_fees_transaction)
|> success?
assert {_, {_block, [%{submited_at_ethheight: 123}], _db_updates}, _} = Core.form_block(@interval, 123, state)
@@ -399,9 +399,9 @@ defmodule OMG.State.CoreTest do
} do
state =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :no_fees_transaction)
|> success?
- |> Core.exec(create_recovered([{@blknum1, 0, 0, bob}], @eth, [{alice, 7}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 0, bob}], @eth, [{alice, 7}]), :no_fees_transaction)
|> success?
assert {:ok, {_, [_trigger1, _trigger2], _}, _} = form_block_check(state)
@@ -414,7 +414,7 @@ defmodule OMG.State.CoreTest do
state_alice_deposit: state
} do
state
- |> Core.exec(create_recovered([{1, 1, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 1, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :no_fees_transaction)
|> same?(state)
assert {:ok, {_, [], _}, _} = form_block_check(state)
@@ -437,7 +437,7 @@ defmodule OMG.State.CoreTest do
} do
state =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :no_fees_transaction)
|> success?
assert {:ok, {_, [_trigger], _}, state} = form_block_check(state)
@@ -459,11 +459,11 @@ defmodule OMG.State.CoreTest do
state =
state
- |> Core.exec(recovered_tx_1, :ignore)
+ |> Core.exec(recovered_tx_1, :no_fees_transaction)
|> success?
- |> Core.exec(recovered_tx_2, :ignore)
+ |> Core.exec(recovered_tx_2, :no_fees_transaction)
|> success?
- |> Core.exec(recovered_tx_3, :ignore)
+ |> Core.exec(recovered_tx_3, :no_fees_transaction)
|> success?
assert {:ok,
@@ -491,7 +491,7 @@ defmodule OMG.State.CoreTest do
} do
state =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :no_fees_transaction)
|> success?
{:ok, {_, _, _}, state} = form_block_check(state)
@@ -517,7 +517,7 @@ defmodule OMG.State.CoreTest do
# persistence tested in-depth elsewhere
{:ok, {_, _, [_ | _]}, state} =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{bob, 7}, {alice, 3}]), :no_fees_transaction)
|> success?
|> form_block_check()
@@ -544,7 +544,7 @@ defmodule OMG.State.CoreTest do
state =
state
- |> Core.exec(tx, :ignore)
+ |> Core.exec(tx, :no_fees_transaction)
|> success?
utxo_pos_exits = [Utxo.position(@blknum1, 0, 0), Utxo.position(@blknum1, 0, 1)]
@@ -578,7 +578,7 @@ defmodule OMG.State.CoreTest do
state =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, amount_1}, {alice, amount_2}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, amount_1}, {alice, amount_2}]), :no_fees_transaction)
|> success?
utxo_pos_exit_1 = Utxo.position(@blknum1, 0, 0)
@@ -589,10 +589,10 @@ defmodule OMG.State.CoreTest do
Core.exit_utxos(utxo_pos_exits, state)
state_after_exit
- |> Core.exec(create_recovered([{@blknum1, 0, 0, alice}], @eth, [{alice, 7}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 0, alice}], @eth, [{alice, 7}]), :no_fees_transaction)
|> fail?(:utxo_not_found)
|> same?(state_after_exit)
- |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{alice, 3}]), :no_fees_transaction)
|> fail?(:utxo_not_found)
end
@@ -601,7 +601,7 @@ defmodule OMG.State.CoreTest do
# persistence tested in-depth elsewhere
tx = create_recovered([{1, 0, 0, alice}], @eth, [{alice, 7}, {alice, 3}])
- state = state |> Core.exec(tx, :ignore) |> success?
+ state = state |> Core.exec(tx, :no_fees_transaction) |> success?
utxo_pos_exits_in_flight = [%{call_data: %{in_flight_tx: Transaction.raw_txbytes(tx)}}]
utxo_pos_exits_piggyback = [%{tx_hash: Transaction.raw_txhash(tx), output_index: 4}]
@@ -613,10 +613,10 @@ defmodule OMG.State.CoreTest do
Core.exit_utxos(utxo_pos_exits_piggyback, state)
state_after_exit
- |> Core.exec(create_recovered([{@blknum1, 0, 0, alice}], @eth, [{alice, 7}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 0, alice}], @eth, [{alice, 7}]), :no_fees_transaction)
|> fail?(:utxo_not_found)
|> same?(state_after_exit)
- |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{alice, 3}]), :no_fees_transaction)
|> success?
end
@@ -625,7 +625,7 @@ defmodule OMG.State.CoreTest do
# persistence tested in-depth elsewhere
state =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 7}, {alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 7}, {alice, 3}]), :no_fees_transaction)
|> success?
tx = create_recovered([{@blknum1, 0, 0, alice}], @eth, [{alice, 3}, {alice, 3}])
@@ -637,10 +637,10 @@ defmodule OMG.State.CoreTest do
Core.exit_utxos(utxo_pos_exits_in_flight, state)
state_after_exit
- |> Core.exec(create_recovered([{@blknum1, 0, 0, alice}], @eth, [{alice, 7}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 0, alice}], @eth, [{alice, 7}]), :no_fees_transaction)
|> fail?(:utxo_not_found)
|> same?(state_after_exit)
- |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{alice, 3}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 0, 1, alice}], @eth, [{alice, 3}]), :no_fees_transaction)
|> success?
end
@@ -667,7 +667,7 @@ defmodule OMG.State.CoreTest do
state =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 10}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 10}]), :no_fees_transaction)
|> success?
assert not Core.utxo_exists?(Utxo.position(1, 0, 0), state)
@@ -694,7 +694,7 @@ defmodule OMG.State.CoreTest do
{:ok, _, state} =
state
|> do_deposit(alice, %{amount: 10, currency: @eth, blknum: 1})
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 10}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 10}]), :no_fees_transaction)
assert {@blknum1, false} = Core.get_status(state)
@@ -708,9 +708,9 @@ defmodule OMG.State.CoreTest do
test "Output can have a zero value; can't be used as input though", %{alice: alice, state_empty: state} do
state
|> do_deposit(alice, %{amount: 10, currency: @eth, blknum: 1})
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 8}, {alice, 0}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 8}, {alice, 0}]), :no_fees_transaction)
|> success?
- |> Core.exec(create_recovered([{1000, 0, 1, alice}], @eth, [{alice, 0}]), :ignore)
+ |> Core.exec(create_recovered([{1000, 0, 1, alice}], @eth, [{alice, 0}]), :no_fees_transaction)
|> fail?(:utxo_not_found)
end
@@ -718,9 +718,9 @@ defmodule OMG.State.CoreTest do
test "Output with zero value does not change oindex of other outputs", %{alice: alice, state_empty: state} do
state
|> do_deposit(alice, %{amount: 10, currency: @eth, blknum: 1})
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 0}, {alice, 8}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 0}, {alice, 8}]), :no_fees_transaction)
|> success?
- |> Core.exec(create_recovered([{1000, 0, 1, alice}], @eth, [{alice, 1}]), :ignore)
+ |> Core.exec(create_recovered([{1000, 0, 1, alice}], @eth, [{alice, 1}]), :no_fees_transaction)
|> success?
end
@@ -728,7 +728,7 @@ defmodule OMG.State.CoreTest do
test "Output with zero value will not be written to DB", %{alice: alice, state_alice_deposit: state} do
state =
state
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 0}]), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, [{alice, 0}]), :no_fees_transaction)
|> success?
{:ok, {_, _, db_updates}, _} = form_block_check(state)
@@ -739,7 +739,7 @@ defmodule OMG.State.CoreTest do
test "Transaction can have no outputs", %{alice: alice, state_empty: state} do
state
|> do_deposit(alice, %{amount: 10, currency: @eth, blknum: 1})
- |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, []), :ignore)
+ |> Core.exec(create_recovered([{1, 0, 0, alice}], @eth, []), :no_fees_transaction)
|> success?
end
@@ -754,19 +754,19 @@ defmodule OMG.State.CoreTest do
# input utxo blknum is greater than state's blknum
state
- |> Core.exec(create_recovered([{future_deposit_blknum, 0, 0, alice}], @eth, [{bob, 6}, {alice, 4}]), :ignore)
+ |> Core.exec(create_recovered([{future_deposit_blknum, 0, 0, alice}], @eth, [{bob, 6}, {alice, 4}]), :no_fees_transaction)
|> fail?(:input_utxo_ahead_of_state)
state
|> Core.exec(
create_recovered([{1, 0, 0, alice}, {future_deposit_blknum, 0, 0, alice}], @eth, [{bob, 6}, {alice, 4}]),
- :ignore
+ :no_fees_transaction
)
|> fail?(:input_utxo_ahead_of_state)
# when non-existent input comes with a blknum of the current block fail with :utxo_not_found
state
- |> Core.exec(create_recovered([{@blknum1, 1, 0, alice}], @eth, [{bob, 6}, {alice, 4}]), :ignore)
+ |> Core.exec(create_recovered([{@blknum1, 1, 0, alice}], @eth, [{bob, 6}, {alice, 4}]), :no_fees_transaction)
|> fail?(:utxo_not_found)
end

MODIFY
apps/omg/test/omg/state/persistence_test.exs
apps/omg/test/omg/state/persistence_test.exs
@@ -173,7 +173,7 @@ defmodule OMG.State.PersistenceTest do
end
defp exec(state, tx) do
- assert {:ok, _, state} = Core.exec(state, tx, :ignore)
+ assert {:ok, _, state} = Core.exec(state, tx, :no_fees_transaction)
state
end

MODIFY
apps/omg/test/omg/state/transaction_test.exs
apps/omg/test/omg/state/transaction_test.exs
@@ -410,7 +410,7 @@ defmodule OMG.State.TransactionTest do
defp assert_tx_usable(signed, state_core) do
{:ok, transaction} = signed |> Transaction.Signed.encode() |> Transaction.Recovered.recover_from()
- assert {:ok, {_, _, _}, _state} = State.Core.exec(state_core, transaction, :ignore)
+ assert {:ok, {_, _, _}, _state} = State.Core.exec(state_core, transaction, :no_fees_transaction)
end
defp parametrized_tester({inputs, outputs}) do

MODIFY
apps/omg/test/omg/state_test.exs
apps/omg/test/omg/state_test.exs
@@ -53,7 +53,7 @@ defmodule OMG.StateTest do
# deposits, transactions, utxo existence
assert {:ok, _} = State.deposit([%{owner: alice.addr, currency: @eth, amount: 10, blknum: 1}])
assert true == State.utxo_exists?(Utxo.position(1, 0, 0))
- assert {:ok, _} = State.exec(TestHelper.create_recovered([{1, 0, 0, alice}], @eth, [{alice, 3}]), :ignore)
+ assert {:ok, _} = State.exec(TestHelper.create_recovered([{1, 0, 0, alice}], @eth, [{alice, 3}]), :no_fees_transaction)
# block forming & status
assert {blknum, _} = State.get_status()
assert :ok = State.form_block()

MODIFY
apps/omg_child_chain/lib/omg_child_chain/fee_server.ex
apps/omg_child_chain/lib/omg_child_chain/fee_server.ex
@@ -40,7 +40,7 @@ defmodule OMG.ChildChain.FeeServer do
args =
case Application.get_env(:omg_child_chain, :ignore_fees) do
true ->
- :ok = save_fees(:ignore, 0)
+ :ok = save_fees(:no_fees_transaction, 0)
_ = Logger.warn("Fee specs from file are ignored.")
args

MODIFY
apps/omg_child_chain/test/omg_child_chain/integration/fee_server_test.exs
apps/omg_child_chain/test/omg_child_chain/integration/fee_server_test.exs
@@ -108,11 +108,11 @@ defmodule OMG.ChildChain.Integration.FeeServerTest do
end
test "fee server ignores file updates" do
- assert {:ok, :ignore} == FeeServer.transaction_fees()
+ assert {:ok, :no_fees_transaction} == FeeServer.transaction_fees()
assert refresh_fees() =~ "Updates takes no effect"
- assert {:ok, :ignore} == FeeServer.transaction_fees()
+ assert {:ok, :no_fees_transaction} == FeeServer.transaction_fees()
assert server_alive?()
end
end

MODIFY
apps/omg_watcher/lib/omg_watcher/block_getter.ex
apps/omg_watcher/lib/omg_watcher/block_getter.ex
@@ -108,7 +108,7 @@ defmodule OMG.Watcher.BlockGetter do
end
def handle_continue({:apply_block_step, :execute_transactions, block_application}, state) do
- tx_exec_results = for(tx <- block_application.transactions, do: OMG.State.exec(tx, :ignore))
+ tx_exec_results = for(tx <- block_application.transactions, do: OMG.State.exec(tx, :no_fees_transaction))
case Core.validate_executions(tx_exec_results, block_application, state) do
{:ok, state} ->

MODIFY
apps/omg_watcher/test/omg_watcher/block_getter/core_test.exs
apps/omg_watcher/test/omg_watcher/block_getter/core_test.exs
@@ -116,7 +116,7 @@ defmodule OMG.Watcher.BlockGetter.CoreTest do
_} = Core.get_blocks_to_apply(state, [%{blknum: block.number, eth_height: synced_height}], synced_height)
# check feasibility of transactions from block to consume at the OMG.State
- assert {:ok, tx_result, _} = OMG.State.Core.exec(state_alice_deposit, tx, :ignore)
+ assert {:ok, tx_result, _} = OMG.State.Core.exec(state_alice_deposit, tx, :no_fees_transaction)
assert {:ok, ^state} = Core.validate_executions([{:ok, tx_result}], block, state)

Rename :ignore to :no_fees_transaction everywhere