Skip to content

Commit

Permalink
Fix rebase with state changes
Browse files Browse the repository at this point in the history
Signed-off-by: Nana-EC <nana.essilfie-conduah@hedera.com>
  • Loading branch information
Nana-EC committed Jan 26, 2022
1 parent 8ac35c6 commit a183288
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ protected final void onContractResult(RecordItem recordItem, ContractResult cont
contractStateChange.setSlot(DomainUtils.toBytes(storageChange.getSlot()));
contractStateChange.setValueRead(DomainUtils.toBytes(storageChange.getValueRead()));

// If a value of zero is written the valueWritten will be present but the inner value will be absent.
// If a value of zero is written the valueWritten will be present but the inner value will be
// absent.
// If a value was read and not written this value will not be present.
if (storageChange.hasValueWritten()) {
contractStateChange
Expand All @@ -120,9 +121,10 @@ protected final void onContractResult(RecordItem recordItem, ContractResult cont
entityListener.onContractStateChange(contractStateChange);
}
}

entityListener.onContractResult(contractResult);
}

// always persist a contract result whether partial or complete
entityListener.onContractResult(contractResult);
}

protected abstract void doUpdateEntity(Contract contract, RecordItem recordItem);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,8 @@ private void assertContractCreateResult(ContractCreateTransactionBody transactio
.returns(EntityId.of(record.getReceipt().getContractID()), ContractResult::getContractId);
}

assertContractResult(consensusTimestamp, result, result.getLogInfoList(), contractResult, result.getStateChangesList()
assertContractResult(consensusTimestamp, result, result.getLogInfoList(), contractResult,
result.getStateChangesList(),
status == ResponseCodeEnum.SUCCESS ? EntityId.of(result.getContractID()) : null);
}

Expand Down

0 comments on commit a183288

Please sign in to comment.