Skip to content

Commit

Permalink
support multi enclaves for host_container
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Mar 27, 2024
1 parent 3ef4267 commit bf553d4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions go/host/container/host_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,12 @@ func NewHostContainerFromConfig(parsedConfig *config.HostInputConfig, logger get
// set the Host ID as the Public Key Address
cfg.ID = ethWallet.Address()

if len(cfg.EnclaveRPCAddresses) != 1 {
logger.Crit("expected exactly one enclave address", "enclave_addresses", cfg.EnclaveRPCAddresses)
}

fmt.Println("Connecting to the enclave...")
services := host.NewServicesRegistry(logger)
enclaveClients := []common.Enclave{enclaverpc.NewClient(cfg.EnclaveRPCAddresses[0], cfg.EnclaveRPCTimeout, logger)}
enclaveClients := make([]common.Enclave, len(cfg.EnclaveRPCAddresses))
for i, addr := range cfg.EnclaveRPCAddresses {
enclaveClients[i] = enclaverpc.NewClient(addr, cfg.EnclaveRPCTimeout, logger)
}
p2pLogger := logger.New(log.CmpKey, log.P2PCmp)
metricsService := metrics.New(cfg.MetricsEnabled, cfg.MetricsHTTPPort, logger)

Expand Down

0 comments on commit bf553d4

Please sign in to comment.