Skip to content

Commit

Permalink
chore: remove non-deterministic regression testcase (unsafeClient)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppedziwiatr committed Feb 23, 2023
1 parent e8b3002 commit d745cae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 1 addition & 6 deletions src/__tests__/regression/test-cases/read-state.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"suEGI_H1NjKhPZVfOJxRTS8sSzaeSMAIZqLfCbSAVj8",
"RRvgew0V1aQzlgY3olVi9WPLojBGNR_jrwDkfyXHtyI",
"mpuVOVsDjH-dazsC3CNlDHiqvVQdydCElVrgcJvkl_o",
"qGNZGZBNv5JffEPkkuYpHEOEtZYHLhrRrRygAjdanqw",
"7nLJGsvxVUKEFIHRVK-DHbgLuH_BIdZaDiRImktkb68",
"IZa8YcXoD9TasS9EoGj5_L0yg_csx7UIQq2I3QWELwI",
"vyDjA2UggLj12tcFR-lKAo1kKaZyNeAM2twEJ62xkco",
Expand All @@ -95,13 +94,9 @@
"8zGVX17V6u3Uzn2fWJFya3vEuPOvIZ6FRifUDhaprtE",
"Zwp7r7Z10O0TuF6lmFApB7m5lJIrE5RbLAVWg_WKNcU",
"1enYq8LDJQ7fxW20WMWxbq3jpMaBeN-k67WXnhEDIds",
"efrXSmKuDH32Svllu9g15PxTlxrL5T3UNT1jxgQqat0",
"RM1oi-MA5gvJiznjAINPCCfcbN18RBgdXMOJcNoqkUM",
"sTSWamZ22DNVQolWIc2L-Cfi88dC7YCE3dtXJwAa1kA",
"42MB4-R4ra6HRk7xOK_JODbKzGQ3gvYjssXHERSTROU",
"Qa9SzAuwJR6xZp3UiKzokKEoRnt_utJKjFjTaSR85Xw",
"38TR3D8BxlPTc89NOW67IkQQUPR8jDLaJNdYv-4wWfM",
"yWDo0H85PVimIpHM86qEP8BzXHIvyIfQE7NeVgTbhxs",
"OrO8n453N6bx921wtsEs-0OCImBLCItNU5oSbFKlFuU",
"-q2dbbzO7Gh0mh80Qh5dVTXfH9AC6XNPqawuNGtjzus"
"OrO8n453N6bx921wtsEs-0OCImBLCItNU5oSbFKlFuU"
]
8 changes: 5 additions & 3 deletions src/core/modules/impl/DefaultStateEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,12 @@ export abstract class DefaultStateEvaluator implements StateEvaluator {
// if that's the end of the root contract's interaction - commit all the uncommitted states to cache.
if (contract.isRoot()) {
// update the uncommitted state of the root contract
contract.setUncommittedState(contract.txId(), lastConfirmedTxState.state);
await contract.commitStates(missingInteraction);
if (lastConfirmedTxState) {
contract.setUncommittedState(contract.txId(), lastConfirmedTxState.state);
await contract.commitStates(missingInteraction);
}
} else {
// if that's a inner contract call - only update the state in the uncommitted states
// if that's an inner contract call - only update the state in the uncommitted states
contract.setUncommittedState(contract.txId(), new EvalStateResult(currentState, validity, errorMessages));
}
}
Expand Down

0 comments on commit d745cae

Please sign in to comment.