Skip to content

Commit

Permalink
[FAB-3965] Review go lint suggestions
Browse files Browse the repository at this point in the history
This patch updates ID in the eventshub interface
according to Go style guidelines.

Change-Id: I3137a950ddc6bcf8e2ae340c2b2bf970db495f98
Signed-off-by: Troy Ronda <[email protected]>
  • Loading branch information
troyronda committed May 17, 2017
1 parent 93f5da5 commit 84f596f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions fabric-client/events/eventhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ type eventHub struct {

// ChaincodeEvent contains the current event data for the event handler
type ChaincodeEvent struct {
ChaincodeId string
TxId string
ChaincodeID string
TxID string
EventName string
Payload []byte
ChannelID string
Expand Down Expand Up @@ -562,8 +562,8 @@ func (eventHub *eventHub) notifyChaincodeRegistrants(channelID string, ccEvent *
callback := v.CallbackFunc
if callback != nil {
callback(&ChaincodeEvent{
ChaincodeId: ccEvent.ChaincodeId,
TxId: ccEvent.TxId,
ChaincodeID: ccEvent.ChaincodeId,
TxID: ccEvent.TxId,
EventName: ccEvent.EventName,
Payload: ccEvent.Payload,
ChannelID: channelID,
Expand Down
12 changes: 6 additions & 6 deletions fabric-client/events/eventhub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ func TestChaincodeEvent(t *testing.T) {
}

// Check CC event
if event.ChaincodeId != ccID {
t.Fatalf("Expecting chaincode ID [%s] but got [%s]", ccID, event.ChaincodeId)
if event.ChaincodeID != ccID {
t.Fatalf("Expecting chaincode ID [%s] but got [%s]", ccID, event.ChaincodeID)
}
if event.EventName != eventName {
t.Fatalf("Expecting event name [%s] but got [%s]", eventName, event.EventName)
Expand Down Expand Up @@ -213,14 +213,14 @@ func TestChaincodeBlockEvent(t *testing.T) {
if event.ChannelID != channelID {
t.Fatalf("Expecting channel ID [%s] but got [%s]", channelID, event.ChannelID)
}
if event.ChaincodeId != ccID {
t.Fatalf("Expecting chaincode ID [%s] but got [%s]", ccID, event.ChaincodeId)
if event.ChaincodeID != ccID {
t.Fatalf("Expecting chaincode ID [%s] but got [%s]", ccID, event.ChaincodeID)
}
if event.EventName != eventName {
t.Fatalf("Expecting event name [%s] but got [%s]", eventName, event.EventName)
}
if event.TxId == "" {
t.Fatalf("Expecting TxID [%s] but got [%s]", txID, event.TxId)
if event.TxID == "" {
t.Fatalf("Expecting TxID [%s] but got [%s]", txID, event.TxID)
}
}

Expand Down

0 comments on commit 84f596f

Please sign in to comment.