public class AccountSupernodeVoteOperation extends Operation
| Constructor and Description |
|---|
AccountSupernodeVoteOperation(AccountName account,
AccountName supernode,
Asset fee)
Like
AccountSupernodeVoteOperation(AccountName, AccountName, boolean, Asset),
but the approve parameter is automatically set to true. |
AccountSupernodeVoteOperation(AccountName account,
AccountName supernode,
boolean approve,
Asset fee)
Create a new account supernode vote operation.
|
| Modifier and Type | Method and Description |
|---|---|
AccountName |
getAccount()
Get the account name that has performed the vote.
|
boolean |
getApprove()
Get the information if this vote has been approved or not.
|
Asset |
getFee() |
Map<SignatureObject,PrivateKeyType> |
getRequiredAuthorities(Map<SignatureObject,PrivateKeyType> requiredAuthoritiesBase)
Add the authorities which are required to sign this operation to an
existing map.
|
AccountName |
getSupernode()
Get the supernode that has been voted for.
|
void |
setAccount(AccountName account)
Set the account name that should perform the vote.
|
void |
setApprove(boolean approve)
Define if this vote is approved or not.
|
void |
setFee(Asset fee) |
void |
setSupernode(AccountName supernode)
Set the supernode that should be voted for.
|
byte[] |
toByteArray()
Covert the operation into a byte array.
|
String |
toString() |
void |
validate(ValidationType validationType)
Use this method to verify that this object is valid.
|
isVirtual, mergeRequiredAuthorities, mergeRequiredAuthoritiespublic AccountSupernodeVoteOperation(AccountName account, AccountName supernode, boolean approve, Asset fee)
All accounts with a VFS can vote for or against any supernode.
If a proxy is specified then all existing votes are removed.
account - Set the account that votes for a
supernode (see getAccount()).supernode - Set the supernode to vote for (see
setSupernode(AccountName)).approve - Define if the vote is be approved or not (see
setApprove(boolean)).fee - The fee of transaction.InvalidParameterException - If one of the parameters does not fulfill the requirements.public AccountSupernodeVoteOperation(AccountName account, AccountName supernode, Asset fee)
AccountSupernodeVoteOperation(AccountName, AccountName, boolean, Asset),
but the approve parameter is automatically set to true.account - Set the account that votes for a
supernode (see getAccount()).supernode - Set the supernode to vote for (see
setSupernode(AccountName)).fee - The fee of transaction.InvalidParameterException - If one of the parameters does not fulfill the requirements.public AccountName getAccount()
public void setAccount(AccountName account)
account - The account name that should perform the vote.InvalidParameterException - If the account account is nullpublic AccountName getSupernode()
public void setSupernode(AccountName supernode)
supernode - The supernode that should be voted for.InvalidParameterException - If the supernode account is nullpublic boolean getApprove()
public void setApprove(boolean approve)
approve - Define if this vote is approved or not.public Asset getFee()
public void setFee(Asset fee)
public byte[] toByteArray()
throws BeowulfInvalidTransactionException
ByteTransformableBeowulfInvalidTransactionException - If there was a problem while transforming the transaction
into a byte array.public Map<SignatureObject,PrivateKeyType> getRequiredAuthorities(Map<SignatureObject,PrivateKeyType> requiredAuthoritiesBase)
OperationgetRequiredAuthorities in class OperationrequiredAuthoritiesBase - A map to which the required authorities of this operation
should be added to.public void validate(ValidationType validationType)
ValidatablevalidationType - An indicator telling the method what should be validated.Copyright © 2019. All rights reserved.