Skip to content

Commit 90498b9

Browse files
committed
Merge branch 'fixes' into 'main'
Fixes See merge request flarenetwork/flare-system-client!53
2 parents 7550d51 + 2eea083 commit 90498b9

File tree

6 files changed

+4
-32
lines changed

6 files changed

+4
-32
lines changed

client/context/context.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ func BuildContext() (ClientContext, error) {
3434
if err != nil {
3535
return nil, err
3636
}
37-
globalConfig.GlobalConfigCallback.Call(cfg)
3837

3938
db, err := database.Connect(&cfg.DB)
4039
if err != nil {

client/main/client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ func main() {
2323
return
2424
}
2525

26+
logger.Set(clientCtx.Config().Logger)
27+
2628
// Prometheus metrics
2729
shared.InitMetricsServer(&clientCtx.Config().Metrics)
2830

client/protocol/submitter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func (s *SignatureSubmitter) RunEpochBeforeDeadline(currentEpoch int64, deadline
366366
}
367367

368368
func (s *SignatureSubmitter) RunEpochAfterDeadline(currentEpoch int64, protocolsToQuery map[int]bool) {
369-
channels := make([]<-chan shared.ExecuteStatus[*SubProtocolResponse], len(protocolsToQuery))
369+
channels := make([]<-chan shared.ExecuteStatus[*SubProtocolResponse], len(s.subProtocols))
370370

371371
ticker := time.NewTicker(s.cycleDuration)
372372

config/callback.go

Lines changed: 0 additions & 15 deletions
This file was deleted.

config/config.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,13 @@ import (
1313
"github.com/BurntSushi/toml"
1414
"github.com/ethereum/go-ethereum/common"
1515
"github.com/ethereum/go-ethereum/ethclient"
16-
"github.com/flare-foundation/go-flare-common/pkg/logger"
1716
"github.com/kelseyhightower/envconfig"
1817
)
1918

2019
const (
2120
ConfigFile string = "config.toml" // name of config file
2221
)
2322

24-
var (
25-
GlobalConfigCallback ConfigCallback[Global] = ConfigCallback[Global]{}
26-
)
27-
28-
type Global interface {
29-
LoggerConfig() logger.Config
30-
ChainConfig() Chain
31-
}
32-
3323
type Chain struct {
3424
ChainID int `toml:"chain_id" envconfig:"CHAIN_ID"`
3525
EthRPCURL string `toml:"eth_rpc_url" envconfig:"ETH_RPC_URL"`

tests/mock/server_mock.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ import (
1212
"net/http"
1313
"time"
1414

15-
"github.com/flare-foundation/flare-system-client/client/config"
16-
17-
globalConfig "github.com/flare-foundation/flare-system-client/config"
18-
1915
"github.com/gorilla/mux"
2016

2117
"github.com/flare-foundation/go-flare-common/pkg/logger"
@@ -114,7 +110,7 @@ func buildMessageForSigning(protocolID uint8, roundID uint32, merkleRoot []byte)
114110
}
115111

116112
func main() {
117-
globalConfig.GlobalConfigCallback.Call(config.Client{Logger: logger.Config{Console: true}})
113+
logger.Set(logger.Config{Console: true})
118114

119115
port := 3100
120116
protocolID := uint8(101)

0 commit comments

Comments
 (0)