Skip to content

Commit

Permalink
Merge pull request #10065 from filecoin-project/jen/api
Browse files Browse the repository at this point in the history
fix: should not serve non v0 apis in v0
  • Loading branch information
magik6k authored Jan 19, 2023
2 parents 2f03bf9 + 1724d16 commit 9463dc4
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 9463dc4

Please sign in to comment.