Skip to content

Commit

Permalink
Merge pull request #76 from kaleido-io/ffi-topic
Browse files Browse the repository at this point in the history
Use NetworkName instead of Name for FFI definition topic
  • Loading branch information
peterbroadhurst authored Jun 23, 2023
2 parents b2ad2ac + db126d5 commit 6815651
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/fftypes/ffi.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (f *FFI) Validate(ctx context.Context) (err error) {
}

func (f *FFI) Topic() string {
return TypeNamespaceNameTopicHash("ffi", f.Namespace, f.Name)
return TypeNamespaceNameTopicHash("ffi", f.Namespace, f.NetworkName)
}

func (f *FFI) SetBroadcastMessage(msgID *UUID) {
Expand Down
5 changes: 3 additions & 2 deletions pkg/fftypes/ffi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,10 @@ func TestFFIParamsValue(t *testing.T) {

func TestFFITopic(t *testing.T) {
ffi := &FFI{
Namespace: "ns1",
Namespace: "ns1",
NetworkName: "math",
}
assert.Equal(t, "01a982a7251400a7ec64fccce6febee3942a56e37967fa2ba26d7d6f43523c82", ffi.Topic())
assert.Equal(t, "c310d11a9bce752d9ee2a93cc86176f668eb6007b701c844a4eb3321f0f8ebf4", ffi.Topic())
}

func TestFFISetBroadCastMessage(t *testing.T) {
Expand Down

0 comments on commit 6815651

Please sign in to comment.