Skip to content

Commit

Permalink
chore: api: the Net API/CLI now remains only on daemon
Browse files Browse the repository at this point in the history
The only part of this repository that does lp2p is now lotus-daemon

Remove the CommonNet type, used exclusively bu the CLI stack

Adjust the rest of struct-memebership to match what went where

End result best seen in diff of `documentation/en/api-v0-methods-miner.md`
  • Loading branch information
ribasushi committed Jun 17, 2024
1 parent 610c984 commit 6eefb2e
Show file tree
Hide file tree
Showing 13 changed files with 468 additions and 1,410 deletions.
5 changes: 0 additions & 5 deletions api/api_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ type Net interface {
ID(context.Context) (peer.ID, error) //perm:read
}

type CommonNet interface {
Common
Net
}

type NatInfo struct {
Reachability network.Reachability
PublicAddrs []string
Expand Down
1 change: 0 additions & 1 deletion api/api_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
// StorageMiner is a low-level interface to the Filecoin network storage miner node
type StorageMiner interface {
Common
Net

ActorAddress(context.Context) (address.Address, error) //perm:read

Expand Down
4 changes: 2 additions & 2 deletions api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
)

// NewCommonRPCV0 creates a new http jsonrpc client.
func NewCommonRPCV0(ctx context.Context, addr string, requestHeader http.Header) (api.CommonNet, jsonrpc.ClientCloser, error) {
var res v0api.CommonNetStruct
func NewCommonRPCV0(ctx context.Context, addr string, requestHeader http.Header) (api.Common, jsonrpc.ClientCloser, error) {
var res v0api.CommonStruct
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
api.GetInternalStructs(&res), requestHeader, jsonrpc.WithErrors(api.RPCErrors))

Expand Down
22 changes: 0 additions & 22 deletions api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions api/v0api/latest.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ import (

type Common = api.Common
type Net = api.Net
type CommonNet = api.CommonNet

type CommonStruct = api.CommonStruct
type CommonStub = api.CommonStub
type NetStruct = api.NetStruct
type NetStub = api.NetStub
type CommonNetStruct = api.CommonNetStruct
type CommonNetStub = api.CommonNetStub

type StorageMiner = api.StorageMiner
type StorageMinerStruct = api.StorageMinerStruct
Expand Down
Loading

0 comments on commit 6eefb2e

Please sign in to comment.