public class EmulatedNode extends Object
| Constructor and Description |
|---|
EmulatedNode(int validatorId,
com.exonum.binding.common.crypto.KeyPair serviceKeyPair)
Creates a context of an emulated node.
|
| Modifier and Type | Method and Description |
|---|---|
EmulatedNodeType |
getNodeType()
Returns a node type - either
EmulatedNodeType.VALIDATOR or
EmulatedNodeType.AUDITOR. |
com.exonum.binding.common.crypto.KeyPair |
getServiceKeyPair()
Returns a service key pair of this node.
|
OptionalInt |
getValidatorId()
Returns a validator id if this node is a validator or
OptionalInt.empty() if this is
an auditor node. |
public EmulatedNode(int validatorId,
com.exonum.binding.common.crypto.KeyPair serviceKeyPair)
validatorId - identifier of the validator node; or any negative value if the node is an
auditorserviceKeyPair - service key pair of the nodepublic EmulatedNodeType getNodeType()
EmulatedNodeType.VALIDATOR or
EmulatedNodeType.AUDITOR.public OptionalInt getValidatorId()
OptionalInt.empty() if this is
an auditor node.public com.exonum.binding.common.crypto.KeyPair getServiceKeyPair()
Copyright © 2019 Exonum. All rights reserved.