Skip to content

Commit

Permalink
curioweb: Move chain state from SSE to rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Apr 19, 2024
1 parent 91ca70d commit dc9eda2
Show file tree
Hide file tree
Showing 7 changed files with 222 additions and 251 deletions.
229 changes: 0 additions & 229 deletions curiosrc/web/api/debug/debug.go

This file was deleted.

4 changes: 2 additions & 2 deletions curiosrc/web/api/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (

"github.com/filecoin-project/lotus/cmd/curio/deps"
"github.com/filecoin-project/lotus/curiosrc/web/api/config"
"github.com/filecoin-project/lotus/curiosrc/web/api/debug"
"github.com/filecoin-project/lotus/curiosrc/web/api/sector"
"github.com/filecoin-project/lotus/curiosrc/web/api/webrpc"
)

func Routes(r *mux.Router, deps *deps.Deps) {
debug.Routes(r.PathPrefix("/debug").Subrouter(), deps)
webrpc.Routes(r.PathPrefix("/webrpc").Subrouter(), deps)
config.Routes(r.PathPrefix("/config").Subrouter(), deps)
sector.Routes(r.PathPrefix("/sector").Subrouter(), deps)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ package webrpc

import (
"context"

"github.com/gorilla/mux"
logging "github.com/ipfs/go-log/v2"

"github.com/filecoin-project/go-jsonrpc"

"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/cmd/curio/deps"
"github.com/gorilla/mux"
)

var log = logging.Logger("webrpc")

type WebRPC struct {
deps *deps.Deps
}
Expand All @@ -16,6 +22,10 @@ func (a *WebRPC) Version(context.Context) (string, error) {
return build.UserVersion(), nil
}

func (a *WebRPC) BlockDelaySecs(context.Context) (uint64, error) {
return build.BlockDelaySecs, nil
}

func Routes(r *mux.Router, deps *deps.Deps) {
handler := &WebRPC{
deps: deps,
Expand Down

0 comments on commit dc9eda2

Please sign in to comment.