Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add addPeer RPC #12

Merged
merged 4 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions direct/eth_backend_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ func (s *EthBackendClientDirect) Peers(ctx context.Context, in *emptypb.Empty, o
return s.server.Peers(ctx, in)
}

func (s *EthBackendClientDirect) AddPeer(ctx context.Context, in *remote.AddPeerRequest, opts ...grpc.CallOption) (*remote.AddPeerReply, error) {
return s.server.AddPeer(ctx, in)
}

func (s *EthBackendClientDirect) PendingBlock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*remote.PendingBlockReply, error) {
return s.server.PendingBlock(ctx, in)
}
4 changes: 4 additions & 0 deletions direct/sentry_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ func (c *SentryClientDirect) PeerEvents(ctx context.Context, in *sentry.PeerEven
return &SentryPeersStreamC{ch: ch, ctx: ctx}, nil
}

func (c *SentryClientDirect) AddPeer(ctx context.Context, in *sentry.AddPeerRequest, opts ...grpc.CallOption) (*sentry.AddPeerReply, error) {
return c.server.AddPeer(ctx, in)
}

type peersReply struct {
r *sentry.PeerEvent
err error
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/ledgerwatch/erigon-lib

go 1.19

replace github.com/ledgerwatch/interfaces v0.0.0-20230412092010-e1c4a1a4279e => github.com/testinprod-io/erigon-interfaces v0.0.0-20230510035441-34721174363e
replace github.com/ledgerwatch/interfaces v0.0.0-20230412092010-e1c4a1a4279e => github.com/testinprod-io/erigon-interfaces v0.0.0-20230515050805-8ded43c581a4

//for local dev:
//replace github.com/ledgerwatch/interfaces v0.0.0-20230412092010-e1c4a1a4279e => ../erigon-interfaces
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/testinprod-io/erigon-interfaces v0.0.0-20230510035441-34721174363e h1:g21YwDs32vw8PR/h/BJxU6ogmGSQOwAg4hJV1J7G8O0=
github.com/testinprod-io/erigon-interfaces v0.0.0-20230510035441-34721174363e/go.mod h1:ugQv1QllJzBny3cKZKxUrSnykkjkBgm27eQM6dnGAcc=
github.com/testinprod-io/erigon-interfaces v0.0.0-20230515050805-8ded43c581a4 h1:kjsZb8DszhJ1XNhwROSwJCDOEwd0ZlkgRG5Z9rBW8GQ=
github.com/testinprod-io/erigon-interfaces v0.0.0-20230515050805-8ded43c581a4/go.mod h1:ugQv1QllJzBny3cKZKxUrSnykkjkBgm27eQM6dnGAcc=
github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg=
github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
Expand Down
571 changes: 351 additions & 220 deletions gointerfaces/remote/ethbackend.pb.go

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions gointerfaces/remote/ethbackend_grpc.pb.go

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

114 changes: 114 additions & 0 deletions gointerfaces/sentry/mocks.go

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

Loading