public abstract class AbstractAccount extends java.lang.Object implements Account
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.atomic.AtomicLong |
nonce |
Constructor and Description |
---|
AbstractAccount() |
Modifier and Type | Method and Description |
---|---|
void |
bindState(AccountState state)
Bind state to an account.
|
long |
getRecentlyUsedNonce()
Get nonce for account.
|
long |
incrementAndGetNonce()
Increment an nonce and get it.
|
void |
setNonce(long nonce)
Set nonce for account.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAddress, getKey
public void bindState(AccountState state)
Account
AccountState.address
is not binded. Only nonce is binded.public void setNonce(long nonce)
Account
nonce
is less than 0, set as 0.public long getRecentlyUsedNonce()
Account
getRecentlyUsedNonce
in interface Account
public long incrementAndGetNonce()
Account
incrementAndGetNonce
in interface Account