Skip to content

Commit 2f8bd7f

Browse files
committed
renaming dxconnect callback since it isnt an event persay
Signed-off-by: hfuss <hayden.fuss@kaleido.io>
1 parent 4e95add commit 2f8bd7f

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

internal/dataexchange/ffdx/ffdx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func (h *FFDX) beforeConnect(ctx context.Context, w wsclient.WSClient) error {
297297
}
298298

299299
for _, cb := range h.callbacks.handlers {
300-
err := cb.DXConnectEvent(h)
300+
err := cb.DXConnect(h)
301301
if err != nil {
302302
log.L(ctx).Errorf("error handling DX connect event: %v", err)
303303
}

internal/dataexchange/ffdx/ffdx_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ func TestMessageEventsBackgroundStart(t *testing.T) {
488488
h.SetOperationHandler("ns1", ocb)
489489
h.AddNode(context.Background(), "ns1", "node1", fftypes.JSONObject{"id": "peer1"})
490490

491-
mcb.On("DXConnectEvent", h).Return(nil)
491+
mcb.On("DXConnect", h).Return(nil)
492492

493493
err := h.Start()
494494
assert.NoError(t, err)
@@ -549,7 +549,7 @@ func TestMessageEvents(t *testing.T) {
549549
ocb := &coremocks.OperationCallbacks{}
550550
h.SetOperationHandler("ns1", ocb)
551551
h.AddNode(context.Background(), "ns1", "node1", fftypes.JSONObject{"id": "peer1"})
552-
mcb.On("DXConnectEvent", h).Return(nil)
552+
mcb.On("DXConnect", h).Return(nil)
553553

554554
err := h.Start()
555555
assert.NoError(t, err)
@@ -615,7 +615,7 @@ func TestBlobEvents(t *testing.T) {
615615
ocb := &coremocks.OperationCallbacks{}
616616
h.SetOperationHandler("ns1", ocb)
617617
h.AddNode(context.Background(), "ns1", "node1", fftypes.JSONObject{"id": "peer1"})
618-
mcb.On("DXConnectEvent", h).Return(nil)
618+
mcb.On("DXConnect", h).Return(nil)
619619

620620
err := h.Start()
621621
assert.NoError(t, err)

internal/orchestrator/bound_callbacks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ func (bc *boundCallbacks) TokensApproved(plugin tokens.Plugin, approval *tokens.
9898
return bc.o.events.TokensApproved(plugin, approval)
9999
}
100100

101-
func (bc *boundCallbacks) DXConnectEvent(plugin dataexchange.Plugin) error {
101+
func (bc *boundCallbacks) DXConnect(plugin dataexchange.Plugin) error {
102102
return bc.o.NetworkMap().CheckNodeIdentityStatus(bc.o.ctx)
103103
}

internal/orchestrator/bound_callbacks_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func TestBoundCallbacksStopped(t *testing.T) {
136136
err = bc.DXEvent(nil, &dataexchangemocks.DXEvent{})
137137
assert.Regexp(t, "FF10446", err)
138138

139-
err = bc.DXConnectEvent(nil)
139+
err = bc.DXConnect(nil)
140140
assert.Regexp(t, "FF10446", err)
141141

142142
err = bc.TokenPoolCreated(context.Background(), nil, &tokens.TokenPool{})

mocks/dataexchangemocks/callbacks.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/dataexchange/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ type Plugin interface {
105105

106106
// Callbacks is the interface provided to the data exchange plugin, to allow it to pass events back to firefly.
107107
type Callbacks interface {
108-
DXConnectEvent(plugin Plugin) error
108+
DXConnect(plugin Plugin) error
109109
// Event has sub-types as defined below, and can be processed and ack'd asynchronously
110110
DXEvent(plugin Plugin, event DXEvent) error
111111
}

0 commit comments

Comments
 (0)