Skip to content

Commit

Permalink
adde BlokchainEndpoint as a param
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Dec 20, 2023
1 parent f430f45 commit d4d4b8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mobile/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type Config struct {
// not possible. Defaults to enabled if unspecified.
AllowTransientConnection bool
PoolName string
BlockchainEndpoint string

// TODO: we don't need to take BloxAddr when there is a discovery mechanism facilitated via fx.land.
// For now we manually take BloxAddr as config.
Expand All @@ -70,6 +71,7 @@ func NewConfig() *Config {
ForceReachabilityPrivate: true,
AllowTransientConnection: true,
PoolName: "0",
BlockchainEndpoint: "api.node3.functionyard.fula.network",
}
}

Expand Down Expand Up @@ -187,7 +189,7 @@ func (cfg *Config) init(mc *Client) error {
blockchain.NewSimpleKeyStorer(""),
blockchain.WithAuthorizer(mc.h.ID()),
blockchain.WithAllowTransientConnection(cfg.AllowTransientConnection),
blockchain.WithBlockchainEndPoint("127.0.0.1:4000"),
blockchain.WithBlockchainEndPoint(cfg.BlockchainEndpoint),
blockchain.WithRelays(cfg.StaticRelays),
blockchain.WithTopicName(cfg.PoolName),
blockchain.WithTimeout(30))
Expand Down
1 change: 1 addition & 0 deletions mobile/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ func Example_poolExchangeDagBetweenClientBlox() {
mcfg.BloxAddr = bloxAddrString + "/p2p/" + h1.ID().String()
mcfg.PoolName = "1"
mcfg.Exchange = bloxAddrString
mcfg.BlockchainEndpoint = "127.0.0.1:4004"
log.Infow("bloxAdd string created", "addr", bloxAddrString+"/p2p/"+h1.ID().String())

c1, err := fulamobile.NewClient(mcfg)
Expand Down

0 comments on commit d4d4b8c

Please sign in to comment.