mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 20:11:21 +00:00
81ea5bab78
* Initial commit * Add sentry gRPC interface * p2psentry directory * Update README.md * Update README.md * Update README.md * Add go package * Correct syntax * add external downloader interface (#2) * Add txpool (#3) * Add private API (#4) * Invert control.proto, add PeerMinBlock, Separare incoming Tx message into a separate stream (#5) Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> * Separate upload messages into its own stream (#6) Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> * Only send changed accounts to listeners (#7) * Txpool interface doc (#9) * More additions * More additions * Fix locking * Intermediate * Fix separation of phases * Intermediate * Fix test * More transformations * New simplified way of downloading headers * Fix hard-coded header sync * Fixed syncing near the tip of the chain * Add architecture diagram source and picture (#10) * More fixes * rename tip to link * Use preverified hashes instead of preverified headers * Fix preverified hashes generation * more parametrisation * Continue parametrisation * Fix grpc data limit, interruption of headers stage * Add ropsten preverified hashes * Typed hashes (#11) * Typed hashes * Fix PeerId * 64-bit tx nonce * Disable penalties * Add goerli settings, bootstrap nodes * Try to fix goerly sync * Remove interfaces * Add proper golang packages, max_block into p2p sentry Status * Prepare for proto overhaul * Squashed 'interfaces/' content from commit ce36053c2 git-subtree-dir: interfaces git-subtree-split: ce36053c24db2f56e48ac752808de60afa1dfb4b * Change EtherReply to address * Adaptations to new types * Switch to new types * Fixes * Fix formatting * Fix lint * Lint fixes, reverse order in types * Fix lint * Fix lint * Fix lint * Fix test * Not supporting eth/66 yet * Fix shutdown * Fix lint * Fix lint * Fix lint * return stopped check Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me> Co-authored-by: b00ris <b00ris@mail.ru> Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com> Co-authored-by: canepat <16927169+canepat@users.noreply.github.com>
134 lines
4.2 KiB
Go
134 lines
4.2 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package remote
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// DBClient is the client API for DB service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type DBClient interface {
|
|
Size(ctx context.Context, in *SizeRequest, opts ...grpc.CallOption) (*SizeReply, error)
|
|
BucketSize(ctx context.Context, in *BucketSizeRequest, opts ...grpc.CallOption) (*BucketSizeReply, error)
|
|
}
|
|
|
|
type dBClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewDBClient(cc grpc.ClientConnInterface) DBClient {
|
|
return &dBClient{cc}
|
|
}
|
|
|
|
func (c *dBClient) Size(ctx context.Context, in *SizeRequest, opts ...grpc.CallOption) (*SizeReply, error) {
|
|
out := new(SizeReply)
|
|
err := c.cc.Invoke(ctx, "/remote.DB/Size", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dBClient) BucketSize(ctx context.Context, in *BucketSizeRequest, opts ...grpc.CallOption) (*BucketSizeReply, error) {
|
|
out := new(BucketSizeReply)
|
|
err := c.cc.Invoke(ctx, "/remote.DB/BucketSize", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// DBServer is the server API for DB service.
|
|
// All implementations must embed UnimplementedDBServer
|
|
// for forward compatibility
|
|
type DBServer interface {
|
|
Size(context.Context, *SizeRequest) (*SizeReply, error)
|
|
BucketSize(context.Context, *BucketSizeRequest) (*BucketSizeReply, error)
|
|
mustEmbedUnimplementedDBServer()
|
|
}
|
|
|
|
// UnimplementedDBServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedDBServer struct {
|
|
}
|
|
|
|
func (UnimplementedDBServer) Size(context.Context, *SizeRequest) (*SizeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Size not implemented")
|
|
}
|
|
func (UnimplementedDBServer) BucketSize(context.Context, *BucketSizeRequest) (*BucketSizeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method BucketSize not implemented")
|
|
}
|
|
func (UnimplementedDBServer) mustEmbedUnimplementedDBServer() {}
|
|
|
|
// UnsafeDBServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to DBServer will
|
|
// result in compilation errors.
|
|
type UnsafeDBServer interface {
|
|
mustEmbedUnimplementedDBServer()
|
|
}
|
|
|
|
func RegisterDBServer(s grpc.ServiceRegistrar, srv DBServer) {
|
|
s.RegisterService(&_DB_serviceDesc, srv)
|
|
}
|
|
|
|
func _DB_Size_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SizeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DBServer).Size(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/remote.DB/Size",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DBServer).Size(ctx, req.(*SizeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _DB_BucketSize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BucketSizeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DBServer).BucketSize(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/remote.DB/BucketSize",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DBServer).BucketSize(ctx, req.(*BucketSizeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _DB_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "remote.DB",
|
|
HandlerType: (*DBServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Size",
|
|
Handler: _DB_Size_Handler,
|
|
},
|
|
{
|
|
MethodName: "BucketSize",
|
|
Handler: _DB_BucketSize_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "remote/db.proto",
|
|
}
|