@ -154,7 +154,7 @@ public class PrivateTransactionProcessor {
final MutableAccount sender =
maybePrivateSender ! = null
? maybePrivateSender
: resolveAccountFromPublicState ( publicWorldState , privateWorldState , senderAddress ) ;
: privateWorldState . createAccount ( senderAddress , 0 , Wei . ZERO ) ;
final long previousNonce = sender . incrementNonce ( ) ;
LOG . trace (
@ -166,8 +166,8 @@ public class PrivateTransactionProcessor {
final MessageFrame initialFrame ;
final Deque < MessageFrame > messageFrameStack = new ArrayDeque < > ( ) ;
if ( transaction . isContractCreation ( ) ) {
final Address c ontractAddress =
Address . c ontractAddress( senderAddress , sender . getNonce ( ) - 1L ) ;
final Address privateC ontractAddress =
Address . privateC ontractAddress( senderAddress , sender . getNonce ( ) - 1L , BytesValue . EMPTY ) ;
initialFrame =
MessageFrame . builder ( )
@ -175,9 +175,9 @@ public class PrivateTransactionProcessor {
. messageFrameStack ( messageFrameStack )
. blockchain ( blockchain )
. worldState ( privateWorldState . updater ( ) )
. address ( c ontractAddress)
. address ( privateC ontractAddress)
. originator ( senderAddress )
. contract ( c ontractAddress)
. contract ( privateC ontractAddress)
. initialGas ( Gas . MAX_VALUE )
. gasPrice ( transaction . getGasPrice ( ) )
. inputData ( BytesValue . EMPTY )
@ -239,14 +239,6 @@ public class PrivateTransactionProcessor {
}
}
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 )