Skip to content

Commit 622537f

Browse files
Remove Transaction#info: [ECR-3793]
This operation is no longer used by the framework.
1 parent bd55453 commit 622537f

File tree

4 files changed

+7
-236
lines changed

4 files changed

+7
-236
lines changed

exonum-java-binding/core/src/main/java/com/exonum/binding/core/transaction/Transaction.java

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package com.exonum.binding.core.transaction;
1818

19+
import com.exonum.core.messages.Runtime.ExecutionError;
20+
1921
/**
2022
* An Exonum transaction.
2123
*
@@ -31,34 +33,15 @@ public interface Transaction {
3133
* @param context a transaction execution context, which allows to access the information about
3234
* this transaction and modify the blockchain state through the included database fork
3335
* @throws TransactionExecutionException if the transaction cannot be executed normally
34-
* and has to be rolled back. The transaction will be committed as failed (status "error"),
35-
* the error code with the optional description will be saved into the storage. The client
36-
* can request the error code to know the reason of the failure
36+
* and has to be rolled back. The transaction will be committed as failed (error kind
37+
* {@linkplain com.exonum.core.messages.Runtime.ErrorKind#SERVICE SERVICE}),
38+
* the {@linkplain ExecutionError#getCode() error code} with the optional description
39+
* will be saved into the storage. The client can request the error code to know the reason
40+
* of the failure
3741
* @throws RuntimeException if an unexpected error occurs. A correct transaction implementation
3842
* must not throw such exceptions. The transaction will be committed as failed
3943
* (status "panic")
4044
*/
4145
void execute(TransactionContext context) throws TransactionExecutionException;
4246

43-
/**
44-
* Returns the information about this transaction in JSON format.
45-
* For example, it is included in the blockchain explorer response to
46-
* a <a href="https://exonum.com/doc/version/0.12/advanced/node-management/#transaction">
47-
* transaction</a> request as 'content.debug'.
48-
*
49-
* <p>By default, no information is provided. If needed, it can be easily implemented
50-
* with {@linkplain com.exonum.binding.common.serialization.json.JsonSerializer Gson}:
51-
*
52-
* <pre><code>
53-
* &#64;Override
54-
* public String info() {
55-
* return JsonSerializer.json().toJson(this);
56-
* }
57-
* </code></pre>
58-
*/
59-
default String info() {
60-
// Empty object by default
61-
return "{}";
62-
}
63-
6447
}

exonum-java-binding/core/src/test/java/com/exonum/binding/core/transaction/TransactionTest.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

exonum-java-binding/fakes/src/main/java/com/exonum/binding/fakes/services/transactions/SetEntryTransaction.java

Lines changed: 0 additions & 89 deletions
This file was deleted.

exonum-java-binding/fakes/src/test/java/com/exonum/binding/fakes/services/transactions/SetEntryTransactionIntegrationTest.java

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)