|
|
@ -34,7 +34,10 @@ import org.apache.tuweni.bytes.Bytes; |
|
|
|
import org.apache.tuweni.bytes.Bytes32; |
|
|
|
import org.apache.tuweni.bytes.Bytes32; |
|
|
|
import org.junit.Before; |
|
|
|
import org.junit.Before; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
import org.junit.runner.RunWith; |
|
|
|
|
|
|
|
import org.mockito.junit.MockitoJUnitRunner; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RunWith(MockitoJUnitRunner.class) |
|
|
|
public class ChainHeadPrivateNonceProviderTest { |
|
|
|
public class ChainHeadPrivateNonceProviderTest { |
|
|
|
private static final Bytes32 PRIVACY_GROUP_ID = |
|
|
|
private static final Bytes32 PRIVACY_GROUP_ID = |
|
|
|
Bytes32.wrap(Bytes.fromBase64String("DyAOiF/ynpc+JXa2YAGB0bCitSlOMNm+ShmB/7M6C4w=")); |
|
|
|
Bytes32.wrap(Bytes.fromBase64String("DyAOiF/ynpc+JXa2YAGB0bCitSlOMNm+ShmB/7M6C4w=")); |
|
|
@ -95,7 +98,6 @@ public class ChainHeadPrivateNonceProviderTest { |
|
|
|
.thenReturn(Hash.ZERO); |
|
|
|
.thenReturn(Hash.ZERO); |
|
|
|
when(privateWorldStateArchive.get(any(Hash.class), any(Hash.class))) |
|
|
|
when(privateWorldStateArchive.get(any(Hash.class), any(Hash.class))) |
|
|
|
.thenReturn(Optional.of(worldState)); |
|
|
|
.thenReturn(Optional.of(worldState)); |
|
|
|
when(account.getNonce()).thenReturn(4L); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final long nonce = privateNonceProvider.getNonce(ADDRESS, PRIVACY_GROUP_ID); |
|
|
|
final long nonce = privateNonceProvider.getNonce(ADDRESS, PRIVACY_GROUP_ID); |
|
|
|
|
|
|
|
|
|
|
|