2017-12-26 32 views
1

以前は、関数が呼び出されたり状態が変更されたときに「イベント」を生成することができるEthereumに取り組んでいました。これらのイベントは、状態の変化を見てアプリケーションから取得できます。 Hyperledgerにはその機能がありますか? ハイパージーガー・ファブリックで「イベント」が見えますが、自分のイベントを生成し、状態が変更されたときにどのようにノード・アプリケーションに取り込むことができますか?あなたがchaincodeの呼び出し中にイベントを指定することができますハイパーエッジファブリックでイベントを生成できますか?

// SetEvent allows the chaincode to set an event on the response to the 
// proposal to be included as part of a transaction. The event will be 
// available within the transaction in the committed block regardless of the 
// validity of the transaction. 
SetEvent(name string, payload []byte) error 

(通称smartcontract):Hyperledgerファブリック内の

答えて

1

は、名前のshim.ChaincodeStubInterface APIの方法があります。後でイベントハブに登録して、イベントを取得することができます。

関連する問題