Skip to content

Commit

Permalink
tentative fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
  • Loading branch information
RatanRSur committed Apr 7, 2021
1 parent d08083d commit 3e3cc12
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public class UpdateTrackingAccount<A extends Account> implements MutableAccount,
// deletion.
private final NavigableMap<UInt256, UInt256> updatedStorage;
private boolean storageWasCleared = false;

@SuppressWarnings("UnusedVariable")
private boolean transactionBoundary = false;

UpdateTrackingAccount(final Address address) {
Expand Down Expand Up @@ -219,13 +221,11 @@ public UInt256 getStorageValue(final UInt256 key) {

@Override
public UInt256 getOriginalStorageValue(final UInt256 key) {
if (transactionBoundary) {
return getStorageValue(key);
} else if (storageWasCleared || account == null) {
return UInt256.ZERO;
} else {
return account.getOriginalStorageValue(key);
}
// if (transactionBoundary) {
return storageWasCleared || account == null ? UInt256.ZERO : account.getStorageValue(key);
// } else {
// return account.getOriginalStorageValue(key);
// }
}

@Override
Expand Down

0 comments on commit 3e3cc12

Please sign in to comment.