Skip to content

Commit

Permalink
the legacy network layer operates together with the p2p layer
Browse files Browse the repository at this point in the history
  • Loading branch information
vanessaviolet committed Feb 7, 2024
1 parent 57a42e2 commit ac1fede
Show file tree
Hide file tree
Showing 7 changed files with 282 additions and 57 deletions.
4 changes: 2 additions & 2 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ metric = false

[rpc]
# enable rpc access by setting a valid TCP port number
port = 8239
port = 6860
# whether respond the runtime of each RPC call
runtime = false

[dev]
# enable the pprof web server with a valid TCP port number
port = 9239
port = 7870
6 changes: 6 additions & 0 deletions config/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ type Custom struct {
ValueLogGC bool `toml:"value-log-gc"`
MaxCompactionLevels int `toml:"max-compaction-levels"`
} `toml:"storage"`
LegacyNetwork struct {
Listener string `toml:"listener"`
GossipNeighbors bool `toml:"gossip-neighbors"`
Metric bool `toml:"metric"`
Peers []string `toml:"peers"`
} `toml:"network"`
P2P struct {
Port int `toml:"port"`
Seeds []string `toml:"seeds"`
Expand Down
6 changes: 6 additions & 0 deletions kernel/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ func (node *Node) Loop() error {
if err != nil {
return err
}
err = node.PingNeighborsFromConfig()
if err != nil {
return err
}
go node.ListenNeighbors()

go node.listenConsumers()
go node.sendGraphToConcensusNodes()
go node.loopCacheQueue()
Expand Down
Loading

0 comments on commit ac1fede

Please sign in to comment.