| Modifier and Type | Method and Description |
|---|---|
com.exonum.binding.common.crypto.PublicKey |
getPublicKey()
Returns the service public key of this node.
|
com.exonum.binding.common.hash.HashCode |
submitTransaction(RawTransaction rawTransaction)
Creates a transaction from the given parameters, signs it with
the node service key, and then submits it into Exonum network.
|
<ResultT> ResultT |
withSnapshot(java.util.function.Function<Snapshot,ResultT> snapshotFunction)
Performs a given function with a snapshot of the current database state.
|
com.exonum.binding.common.hash.HashCode submitTransaction(RawTransaction rawTransaction) throws InternalServerError
Incorrect transactions (e.g., the payload of which cannot be deserialized by the target service, or which have unknown message id) are rejected by the network.
Be aware that each node has its own service key pair, therefore invocations of this method on different nodes will produce different transactions.rawTransaction - transaction parameters to include in transaction messageInternalServerError - if this node failed to process the transactionjava.lang.NullPointerException - if the transaction is nullBlockchain.getTxMessages()<ResultT> ResultT withSnapshot(java.util.function.Function<Snapshot,ResultT> snapshotFunction)
ResultT - a type the function returnssnapshotFunction - a function to executecom.exonum.binding.common.crypto.PublicKey getPublicKey()
submitTransaction(RawTransaction).
This key is stored under "service_public_key" key in the node configuration file.
java.lang.IllegalStateException - if the node proxy is closedCopyright © 2019 Exonum. All rights reserved.