Skip to content

Commit

Permalink
missing factory in topology
Browse files Browse the repository at this point in the history
Signed-off-by: Angelo De Caro <[email protected]>
  • Loading branch information
adecaro committed Oct 21, 2024
1 parent 1f343f3 commit e97e953
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions integration/fabric/iouhsm/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,26 @@ func Topology(sdk api2.SDK, commType fsc.P2PCommunicationType, replicationOpts *
AddOptions(fabric.WithOrganization("Org1"), fabric.WithDefaultIdentityByHSM()).
AddOptions(replicationOpts.For("approver")...).
RegisterResponder(&views.ApproverView{}, &views.CreateIOUView{}).
RegisterResponder(&views.ApproverView{}, &views.UpdateIOUView{})
RegisterResponder(&views.ApproverView{}, &views.UpdateIOUView{}).
RegisterViewFactory("finality", &views.FinalityViewFactory{})

// Add the borrower's FSC node
fscTopology.AddNodeByName("borrower").
AddOptions(fabric.WithOrganization("Org2"), fabric.WithDefaultIdentityByHSM(), fabric.WithX509IdentityByHSM("borrower-hsm-2")).
AddOptions(replicationOpts.For("borrower")...).
RegisterViewFactory("create", &views.CreateIOUViewFactory{}).
RegisterViewFactory("update", &views.UpdateIOUViewFactory{}).
RegisterViewFactory("query", &views.QueryViewFactory{})
RegisterViewFactory("query", &views.QueryViewFactory{}).
RegisterViewFactory("finality", &views.FinalityViewFactory{})

// Add the lender's FSC node
fscTopology.AddNodeByName("lender").
AddOptions(fabric.WithOrganization("Org3"), fabric.WithDefaultIdentityWithLabel("lender")).
AddOptions(replicationOpts.For("lender")...).
RegisterResponder(&views.CreateIOUResponderView{}, &views.CreateIOUView{}).
RegisterResponder(&views.UpdateIOUResponderView{}, &views.UpdateIOUView{}).
RegisterViewFactory("query", &views.QueryViewFactory{})
RegisterViewFactory("query", &views.QueryViewFactory{}).
RegisterViewFactory("finality", &views.FinalityViewFactory{})

// Add Fabric SDK to FSC Nodes
fscTopology.AddSDK(sdk)
Expand Down

0 comments on commit e97e953

Please sign in to comment.