Skip to content

Commit

Permalink
fix: should not serve non v0 api in v1
Browse files Browse the repository at this point in the history
  • Loading branch information
jennijuju committed Jan 19, 2023
1 parent 2f03bf9 commit 1724d16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion node/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ func FullNodeHandler(a v1api.FullNode, permissioned bool, opts ...jsonrpc.Server
fnapi = api.PermissionedFullAPI(fnapi)
}

var v0 v0api.FullNode = &(struct{ v0api.FullNode }{&v0api.WrapperV1Full{FullNode: fnapi}})
serveRpc("/rpc/v1", fnapi)
serveRpc("/rpc/v0", &v0api.WrapperV1Full{FullNode: fnapi})
serveRpc("/rpc/v0", v0)

// Import handler
handleImportFunc := handleImport(a.(*impl.FullNodeAPI))
Expand Down

0 comments on commit 1724d16

Please sign in to comment.