@ -1266,7 +1266,7 @@ defmodule Explorer.ChainTest do
% InternalTransaction { id : first_id } =
% InternalTransaction { id : first_id } =
insert ( :internal_transaction ,
insert ( :internal_transaction ,
index : 0 ,
index : 1 ,
transaction : transaction ,
transaction : transaction ,
to_address : address ,
to_address : address ,
block_number : transaction . block_number ,
block_number : transaction . block_number ,
@ -1275,14 +1275,18 @@ defmodule Explorer.ChainTest do
% InternalTransaction { id : second_id } =
% InternalTransaction { id : second_id } =
insert ( :internal_transaction ,
insert ( :internal_transaction ,
index : 1 ,
index : 2 ,
transaction : transaction ,
transaction : transaction ,
to_address : address ,
to_address : address ,
block_number : transaction . block_number ,
block_number : transaction . block_number ,
transaction_index : transaction . index
transaction_index : transaction . index
)
)
result = address |> Chain . address_to_internal_transactions ( ) |> Enum . map ( & &1 . id )
result =
address
|> Chain . address_to_internal_transactions ( )
|> Enum . map ( & &1 . id )
assert Enum . member? ( result , first_id )
assert Enum . member? ( result , first_id )
assert Enum . member? ( result , second_id )
assert Enum . member? ( result , second_id )
end
end
@ -1433,15 +1437,9 @@ defmodule Explorer.ChainTest do
:internal_transaction ,
:internal_transaction ,
transaction : first_b_transaction ,
transaction : first_b_transaction ,
to_address : address ,
to_address : address ,
<<< <<< < HEAD
index : 1 ,
transaction_index : first_b_transaction . index ,
block_number : first_b_transaction . block_number
=== === =
index : 2 ,
index : 2 ,
block_number : first_b_transaction . block_number ,
block_number : first_b_transaction . block_number ,
transaction_index : first_b_transaction . index
transaction_index : first_b_transaction . index
>>> >>> > c06b04ad ... fixup! Add ' block_number ' and ' transaction_index ' in ' internal_transaction '
)
)
result =
result =
@ -1461,24 +1459,14 @@ defmodule Explorer.ChainTest do
:internal_transaction ,
:internal_transaction ,
transaction : pending_transaction ,
transaction : pending_transaction ,
to_address : address ,
to_address : address ,
<<< <<< < HEAD
index : 1
index : 0 ,
transaction_index : pending_transaction . index
=== === =
index : 1 ,
>>> >>> > c06b04ad ... fixup! Add ' block_number ' and ' transaction_index ' in ' internal_transaction '
)
)
insert (
insert (
:internal_transaction ,
:internal_transaction ,
transaction : pending_transaction ,
transaction : pending_transaction ,
to_address : address ,
to_address : address ,
<<< <<< < HEAD
index : 2
index : 1 ,
transaction_index : pending_transaction . index
=== === =
index : 2 ,
>>> >>> > c06b04ad ... fixup! Add ' block_number ' and ' transaction_index ' in ' internal_transaction '
)
)
a_block = insert ( :block , number : 2000 )
a_block = insert ( :block , number : 2000 )
@ -1493,15 +1481,9 @@ defmodule Explorer.ChainTest do
:internal_transaction ,
:internal_transaction ,
transaction : first_a_transaction ,
transaction : first_a_transaction ,
to_address : address ,
to_address : address ,
<<< <<< < HEAD
index : 0 ,
transaction_index : first_a_transaction . index ,
block_number : first_a_transaction . block_number
=== === =
index : 1 ,
index : 1 ,
block_number : first_a_transaction . block_number ,
block_number : first_a_transaction . block_number ,
transaction_index : first_a_transaction . index
transaction_index : first_a_transaction . index
>>> >>> > c06b04ad ... fixup! Add ' block_number ' and ' transaction_index ' in ' internal_transaction '
)
)
% InternalTransaction { id : second } =
% InternalTransaction { id : second } =
@ -1509,15 +1491,9 @@ defmodule Explorer.ChainTest do
:internal_transaction ,
:internal_transaction ,
transaction : first_a_transaction ,
transaction : first_a_transaction ,
to_address : address ,
to_address : address ,
<<< <<< < HEAD
index : 1 ,
transaction_index : first_a_transaction . index ,
block_number : first_a_transaction . block_number
=== === =
index : 2 ,
index : 2 ,
block_number : first_a_transaction . block_number ,
block_number : first_a_transaction . block_number ,
transaction_index : first_a_transaction . index
transaction_index : first_a_transaction . index
>>> >>> > c06b04ad ... fixup! Add ' block_number ' and ' transaction_index ' in ' internal_transaction '
)
)
second_a_transaction =
second_a_transaction =
@ -1530,15 +1506,9 @@ defmodule Explorer.ChainTest do
:internal_transaction ,
:internal_transaction ,
transaction : second_a_transaction ,
transaction : second_a_transaction ,
to_address : address ,
to_address : address ,
<<< <<< < HEAD
index : 0 ,
transaction_index : second_a_transaction . index ,
block_number : second_a_transaction . block_number
=== === =
index : 1 ,
index : 1 ,
block_number : second_a_transaction . block_number ,
block_number : second_a_transaction . block_number ,
transaction_index : second_a_transaction . index
transaction_index : second_a_transaction . index
>>> >>> > c06b04ad ... fixup! Add ' block_number ' and ' transaction_index ' in ' internal_transaction '
)
)
% InternalTransaction { id : fourth } =
% InternalTransaction { id : fourth } =
@ -1546,15 +1516,9 @@ defmodule Explorer.ChainTest do
:internal_transaction ,
:internal_transaction ,
transaction : second_a_transaction ,
transaction : second_a_transaction ,
to_address : address ,
to_address : address ,
<<< <<< < HEAD
index : 1 ,
transaction_index : second_a_transaction . index ,
block_number : second_a_transaction . block_number
=== === =
index : 2 ,
index : 2 ,
block_number : second_a_transaction . block_number ,
block_number : second_a_transaction . block_number ,
transaction_index : second_a_transaction . index
transaction_index : second_a_transaction . index
>>> >>> > c06b04ad ... fixup! Add ' block_number ' and ' transaction_index ' in ' internal_transaction '
)
)
b_block = insert ( :block , number : 6000 )
b_block = insert ( :block , number : 6000 )
@ -1594,7 +1558,7 @@ defmodule Explorer.ChainTest do
|> Enum . map ( & &1 . id )
|> Enum . map ( & &1 . id )
# block number ==, transaction index ==, internal transaction index <
# block number ==, transaction index ==, internal transaction index <
assert [ fifth , f ourth , third , second , first ] ==
assert [ fourth , third , second , first ] ==
address
address
|> Chain . address_to_internal_transactions (
|> Chain . address_to_internal_transactions (
paging_options : % PagingOptions { key : { 6000 , 0 , 1 } , page_size : 8 }
paging_options : % PagingOptions { key : { 6000 , 0 , 1 } , page_size : 8 }