Skip to content

Commit

Permalink
rpc: Register klay and kaia to mainbridge peer RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
blukat29 authored and hyeonLewis committed Jun 27, 2024
1 parent 961d321 commit 70514db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion node/sc/mainbridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,14 @@ func (mb *MainBridge) SetComponents(components []interface{}) {
case []rpc.API:
logger.Debug("p2p rpc registered", "len(v)", len(v))
for _, api := range v {
if api.Public && api.Namespace == "klay" {
// TODO-Kaia-RPC: cleanup
if api.Public && (api.Namespace == "klay" || api.Namespace == "kaia") {
api.Namespace = "klay"
logger.Error("p2p rpc registered", "namespace", api.Namespace)
if err := mb.rpcServer.RegisterName(api.Namespace, api.Service); err != nil {
logger.Error("pRPC failed to register", "namespace", api.Namespace)
}
api.Namespace = "kaia"
logger.Error("p2p rpc registered", "namespace", api.Namespace)
if err := mb.rpcServer.RegisterName(api.Namespace, api.Service); err != nil {
logger.Error("pRPC failed to register", "namespace", api.Namespace)
Expand Down

0 comments on commit 70514db

Please sign in to comment.