Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Remove resolveAccountFromPublicState
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistevam committed Mar 4, 2019
1 parent 69d5f31 commit cddaa78
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public Result processTransaction(
final MutableAccount sender =
maybePrivateSender != null
? maybePrivateSender
: resolveAccountFromPublicState(publicWorldState, privateWorldState, senderAddress);
: privateWorldState.createAccount(senderAddress, 0, Wei.ZERO);

final long previousNonce = sender.incrementNonce();
LOG.trace(
Expand Down Expand Up @@ -239,14 +239,6 @@ public Result processTransaction(
}
}

private MutableAccount resolveAccountFromPublicState(
final WorldUpdater publicWorldState,
final WorldUpdater privateWorldState,
final Address senderAddress) {
final MutableAccount publicSender = publicWorldState.getOrCreate(senderAddress);
return privateWorldState.createAccount(senderAddress, publicSender.getNonce(), Wei.ZERO);
}

private static void clearEmptyAccounts(final WorldUpdater worldState) {
worldState.getTouchedAccounts().stream()
.filter(Account::isEmpty)
Expand Down

0 comments on commit cddaa78

Please sign in to comment.