From 0c82e7abe5260a3a92310f396a1fc4c8001f826f Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 4 Apr 2024 10:58:21 -0500 Subject: [PATCH] GH-2102 Handle corner case of trx locally applied but not in a block yet --- tests/trx_finality_status_forked_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/trx_finality_status_forked_test.py b/tests/trx_finality_status_forked_test.py index a76f75d9f7..073fa3c3b9 100755 --- a/tests/trx_finality_status_forked_test.py +++ b/tests/trx_finality_status_forked_test.py @@ -186,6 +186,7 @@ def getBlockID(status): if state == irreversibleState: Print(f"Transaction became irreversible before it could be found forked out: {json.dumps(retStatus, indent=1)}") + testSuccessful = True sys.exit(0) assert state == forkedOutState, \ @@ -209,7 +210,7 @@ def getBlockID(status): info = prodD.getInfo() retStatus = prodD.getTransactionStatus(transId) state = getState(retStatus) - blockNum = getBlockNum(retStatus) + blockNum = getBlockNum(retStatus) + 2 # Add 2 to give time to move from locally applied to in-block if (state == inBlockState or state == irreversibleState) or ( info['head_block_producer'] == 'defproducerd' and info['last_irreversible_block_num'] > blockNum ): break