From 06bc7323cae9eca96d69937b31243c4dd74ec31c Mon Sep 17 00:00:00 2001 From: ligi Date: Wed, 24 Dec 2014 23:56:33 +0100 Subject: [PATCH] simplify --- .../src/main/java/org/ethereum/db/RepositoryTrack.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ethereumj-core/src/main/java/org/ethereum/db/RepositoryTrack.java b/ethereumj-core/src/main/java/org/ethereum/db/RepositoryTrack.java index a5bf1904..4b01d86b 100644 --- a/ethereumj-core/src/main/java/org/ethereum/db/RepositoryTrack.java +++ b/ethereumj-core/src/main/java/org/ethereum/db/RepositoryTrack.java @@ -69,16 +69,12 @@ public class RepositoryTrack implements Repository { @Override public boolean isExist(byte[] addr) { - boolean exist = false; AccountState accountState = cacheAccounts.get(wrap(addr)); - if (accountState != null && !accountState.isDeleted()) exist = true; + if (accountState != null) return !accountState.isDeleted(); - if (accountState == null){ - accountState = repository.getAccountState(addr); - if (accountState != null && !accountState.isDeleted()) exist = true; - } + accountState = repository.getAccountState(addr); + return accountState != null && !accountState.isDeleted(); - return exist; }