fix: state is being put in cache twice when only one interaction is missing

This commit is contained in:
Asia
2024-02-13 15:44:42 +01:00
parent 7a53cc397e
commit eb51016a16

View File

@@ -343,7 +343,7 @@ export abstract class DefaultStateEvaluator implements StateEvaluator {
// state could have been fully retrieved from cache
// or there were no interactions below requested sort key
if (lastConfirmedTxState !== null) {
if (lastConfirmedTxState !== null && !(contract.isRoot() && missingInteractions.length == 1)) {
await this.onStateEvaluated(lastConfirmedTxState.tx, executionContext, lastConfirmedTxState.state);
}