From 432ee4ab5bdc20d5f010e807bf9e454e20caf907 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 10 Nov 2022 21:06:14 +0800 Subject: [PATCH] fix: unstable tx_priority test (#1440) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix unstable tx_priority test * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang Co-authored-by: yihuang Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> --- tests/integration_tests/test_priority.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests/test_priority.py b/tests/integration_tests/test_priority.py index d6502a29..c3de9cec 100644 --- a/tests/integration_tests/test_priority.py +++ b/tests/integration_tests/test_priority.py @@ -184,7 +184,10 @@ def test_native_tx_priority(ethermint: Ethermint): tx_indexes = [(int(r["height"]), r["index"]) for r in tx_results] print(tx_indexes) # the first sent tx are included later, because of lower priority - assert all(i1 > i2 for i1, i2 in zip(tx_indexes, tx_indexes[1:])) + # ensure desc within continuous block + assert all(( + b1 < b2 or (b1 == b2 and i1 > i2) + ) for (b1, i1), (b2, i2) in zip(tx_indexes, tx_indexes[1:])) def get_max_priority_price(max_priority_price):