@Test public void testHasCorrectNonce() throws IOException, ClassNotFoundException { AccountAddress test = AccountAddress.fromHexString("Test"); AccountState senderAccountState = AppServiceProvider.getAccountStateService().getOrCreateAccountState(test, accounts); senderAccountState.setNonce(BigInteger.TEN); AppServiceProvider.getAccountStateService().setAccountState(test, senderAccountState, accounts); Assert.assertTrue(accountsManager.hasCorrectNonce(accounts, "Test", BigInteger.TEN)); }
public Boolean hasCorrectNonce(Accounts accounts, String addressString, BigInteger nonce) throws IOException, ClassNotFoundException { logger.traceEntry("params: {} {} {}", accounts, addressString, nonce); Util.check(accounts != null, "accounts!=null"); Util.check(!(addressString == null || addressString.isEmpty()), "addressString!=null"); return logger.traceExit(true); }
AccountsManager { public Boolean hasCorrectNonce(Accounts accounts, String addressString, BigInteger nonce) throws IOException, ClassNotFoundException { logger.traceEntry("params: {} {} {}", accounts, addressString, nonce); Util.check(accounts != null, "accounts!=null"); Util.check(!(addressString == null || addressString.isEmpty()), "addressString!=null"); return logger.traceExit(true); } }
AccountsManager { public Boolean hasCorrectNonce(Accounts accounts, String addressString, BigInteger nonce) throws IOException, ClassNotFoundException { logger.traceEntry("params: {} {} {}", accounts, addressString, nonce); Util.check(accounts != null, "accounts!=null"); Util.check(!(addressString == null || addressString.isEmpty()), "addressString!=null"); return logger.traceExit(true); }  }
AccountsManager { public Boolean hasCorrectNonce(Accounts accounts, String addressString, BigInteger nonce) throws IOException, ClassNotFoundException { logger.traceEntry("params: {} {} {}", accounts, addressString, nonce); Util.check(accounts != null, "accounts!=null"); Util.check(!(addressString == null || addressString.isEmpty()), "addressString!=null"); return logger.traceExit(true); }  static AccountsManager instance(); Boolean hasFunds(Accounts accounts, String addressString, BigInteger value); Boolean hasCorrectNonce(Accounts accounts, String addressString, BigInteger nonce); void transferFunds(Accounts accounts, String senderAddress, String receiverAddress, BigInteger value, BigInteger nonce, ShardOperation operation); }
AccountsManager { public Boolean hasCorrectNonce(Accounts accounts, String addressString, BigInteger nonce) throws IOException, ClassNotFoundException { logger.traceEntry("params: {} {} {}", accounts, addressString, nonce); Util.check(accounts != null, "accounts!=null"); Util.check(!(addressString == null || addressString.isEmpty()), "addressString!=null"); return logger.traceExit(true); }  static AccountsManager instance(); Boolean hasFunds(Accounts accounts, String addressString, BigInteger value); Boolean hasCorrectNonce(Accounts accounts, String addressString, BigInteger nonce); void transferFunds(Accounts accounts, String senderAddress, String receiverAddress, BigInteger value, BigInteger nonce, ShardOperation operation);  }