@FunctionalInterface public interface Transaction
| Modifier and Type | Method and Description |
|---|---|
void |
execute(TransactionContext context)
Execute the transaction, possibly modifying the blockchain state.
|
void execute(TransactionContext context) throws TransactionExecutionException
context - a transaction execution context, which allows to access the information about
this transaction and modify the blockchain state through the included database forkTransactionExecutionException - if the transaction cannot be executed normally
and has to be rolled back. The transaction will be committed as failed (error kind
SERVICE),
the error code with the optional description
will be saved into the storage. The client can request the error code to know the reason
of the failureRuntimeException - if an unexpected error occurs. A correct transaction implementation
must not throw such exceptions. The transaction will be committed as failed
(status "panic")Copyright © 2019 Exonum. All rights reserved.