Skip to content

Commit 65a47cf

Browse files
mmsqeyihuangadisaran64fedekunze
committed
fix: unstable tx_priority test (evmos#1440)
* fix unstable tx_priority test * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <[email protected]> * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: Adi Saravanan <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]>
1 parent a114a1a commit 65a47cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/integration_tests/test_priority.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@ def test_native_tx_priority(ethermint: Ethermint):
184184
tx_indexes = [(int(r["height"]), r["index"]) for r in tx_results]
185185
print(tx_indexes)
186186
# the first sent tx are included later, because of lower priority
187-
assert all(i1 > i2 for i1, i2 in zip(tx_indexes, tx_indexes[1:]))
187+
# ensure desc within continuous block
188+
assert all((
189+
b1 < b2 or (b1 == b2 and i1 > i2)
190+
) for (b1, i1), (b2, i2) in zip(tx_indexes, tx_indexes[1:]))
188191

189192

190193
def get_max_priority_price(max_priority_price):

0 commit comments

Comments
 (0)