@FunctionalInterface
public interface Transaction
| Modifier and Type | Method and Description |
|---|---|
void |
execute(TransactionContext context)
Execute the transaction, possibly modifying the blockchain state.
|
default java.lang.String |
info()
Returns some information about this transaction in JSON format.
|
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 (status "error"),
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 failurejava.lang.RuntimeException - if an unexpected error occurs. A correct transaction implementation
must not throw such exceptions. The transaction will be committed as failed
(status "panic")default java.lang.String info()
Copyright © 2019 Exonum. All rights reserved.