Skip to content

Commit 40126d0

Browse files
authored
Merge pull request #304 from denyeart/setevent_doc
Update setEvent documentation
2 parents 39d4f99 + 54a32d3 commit 40126d0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/shim/ChaincodeStub.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,15 @@ public interface ChaincodeStub {
572572
QueryResultsIterator<KeyValue> getPrivateDataQueryResult(String collection, String query);
573573

574574
/**
575-
* Defines the CHAINCODE type event that will be posted to interested clients
576-
* when the chaincode's result is committed to the ledger.
575+
* Allows the chaincode to propose an event on the transaction proposal response.
576+
* When the transaction is included in a block and the block is successfully committed to the ledger,
577+
* the block event (including transaction level chaincode events)
578+
* will be delivered to the current client application event listeners that have been registered with the peer's event producer.
579+
* Consult each SDK's documentation for details.
580+
* Only a single chaincode event can be included in a transaction.
581+
* If setEvent() is called multiple times only the last event will be included in the transaction.
582+
* The event must originate from the outer-most invoked chaincode in chaincode-to-chaincode scenarios.
583+
* The marshaled ChaincodeEvent will be available in the transaction's ChaincodeAction.events field.
577584
*
578585
* @param name Name of event. Cannot be null or empty string.
579586
* @param payload Optional event payload.

0 commit comments

Comments
 (0)