Merge pull request #170 from flashbots/no-sandwiches
If no sandwiched swaps, not a sandwich
This commit is contained in:
commit
cfa3443f88
@ -48,12 +48,13 @@ def _get_sandwich_starting_with_swap(
|
|||||||
and other_swap.token_in_address == front_swap.token_out_address
|
and other_swap.token_in_address == front_swap.token_out_address
|
||||||
and other_swap.from_address == sandwicher_address
|
and other_swap.from_address == sandwicher_address
|
||||||
):
|
):
|
||||||
return Sandwich(
|
if len(sandwiched_swaps) > 0:
|
||||||
block_number=front_swap.block_number,
|
return Sandwich(
|
||||||
sandwicher_address=sandwicher_address,
|
block_number=front_swap.block_number,
|
||||||
frontrun_swap=front_swap,
|
sandwicher_address=sandwicher_address,
|
||||||
backrun_swap=other_swap,
|
frontrun_swap=front_swap,
|
||||||
sandwiched_swaps=sandwiched_swaps,
|
backrun_swap=other_swap,
|
||||||
)
|
sandwiched_swaps=sandwiched_swaps,
|
||||||
|
)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user