Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.1 -> main] Fix test failure due to trx hitting near end of block production time #107

Merged
merged 3 commits into from
Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/trx_finality_status_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,16 @@ def isState(state, expectedState, allowedState=None, notAllowedState=None):
postInfo = None
transferAmount=10

# ensuring that prod0's producer is active, which will give sufficient time to identify the transaction as "LOCALLY_APPLIED" before it travels
# through the chain of nodes to node0 to be added to a block
# Ensuring that prod0's producer is active, which will give more time to identify the transaction as "LOCALLY_APPLIED" before it travels
# through the chain of nodes to node0 to be added to a block. It is still possible to hit the end of a block and state be IN_BLOCK here.
# defproducera -> defproducerb -> defproducerc -> NPN
prod0.waitForProducer("defproducera", exitOnError=True)
testNode.transferFunds(cluster.eosioAccount, account1, f"{transferAmount}.0000 {CORE_SYMBOL}", "fund account")
transId=testNode.getLastTrackedTransactionId()
retStatus=testNode.getTransactionStatus(transId)
state = getState(retStatus)

assert state == localState, \
assert (state == localState or state == inBlockState), \
f"ERROR: getTransactionStatus didn't return \"{localState}\" state.\n\nstatus: {json.dumps(retStatus, indent=1)}"
status.append(copy.copy(retStatus))
startingBlockNum=testNode.getInfo()["head_block_num"]
Expand Down