Rename Evil to Darkside, because writing tests isn't evil

This commit is contained in:
Taylor Hornby 2020-03-10 13:43:28 -06:00 committed by Larry Ruane
parent 673a9635fc
commit d258ee75b0
3 changed files with 113 additions and 110 deletions

View File

@ -256,8 +256,10 @@ func (s *LwdStreamer) Ping(ctx context.Context, in *walletrpc.Duration) (*wallet
return &response, nil return &response, nil
} }
// Evil
func (s *LwdStreamer) EvilGetIncomingTransactions(in *walletrpc.Empty, resp walletrpc.CompactTxStreamer_EvilGetIncomingTransactionsServer) error { // Darkside
func (s *LwdStreamer) DarksideGetIncomingTransactions(in *walletrpc.Empty, resp walletrpc.CompactTxStreamer_DarksideGetIncomingTransactionsServer) error {
// Get all of the new incoming transactions evil zcashd has accepted. // Get all of the new incoming transactions evil zcashd has accepted.
result, rpcErr := common.RawRequest("x_getincomingtransactions", nil) result, rpcErr := common.RawRequest("x_getincomingtransactions", nil)
@ -285,7 +287,7 @@ func (s *LwdStreamer) EvilGetIncomingTransactions(in *walletrpc.Empty, resp wall
return nil return nil
} }
func (s *LwdStreamer) EvilSetState(ctx context.Context, state *walletrpc.EvilLightwalletdState) (*walletrpc.Empty, error) { func (s *LwdStreamer) DarksideSetState(ctx context.Context, state *walletrpc.DarksideLightwalletdState) (*walletrpc.Empty, error) {
match, err := regexp.Match("\\A[a-zA-Z0-9]+\\z", []byte(state.BranchID)) match, err := regexp.Match("\\A[a-zA-Z0-9]+\\z", []byte(state.BranchID))
if err != nil || !match { if err != nil || !match {
return nil, errors.New("Invalid branch ID") return nil, errors.New("Invalid branch ID")

View File

@ -486,7 +486,7 @@ func (m *TransparentAddressBlockFilter) GetRange() *BlockRange {
// are microseconds. // are microseconds.
type Duration struct { type Duration struct {
IntervalUs int64 `protobuf:"varint,1,opt,name=intervalUs,proto3" json:"intervalUs,omitempty"` IntervalUs int64 `protobuf:"varint,1,opt,name=intervalUs,proto3" json:"intervalUs,omitempty"`
type EvilLightwalletdState struct { type DarksideLightwalletdState struct {
StartHeight int32 `protobuf:"varint,1,opt,name=startHeight,proto3" json:"startHeight,omitempty"` StartHeight int32 `protobuf:"varint,1,opt,name=startHeight,proto3" json:"startHeight,omitempty"`
SaplingActivation int32 `protobuf:"varint,2,opt,name=saplingActivation,proto3" json:"saplingActivation,omitempty"` SaplingActivation int32 `protobuf:"varint,2,opt,name=saplingActivation,proto3" json:"saplingActivation,omitempty"`
BranchID string `protobuf:"bytes,3,opt,name=branchID,proto3" json:"branchID,omitempty"` BranchID string `protobuf:"bytes,3,opt,name=branchID,proto3" json:"branchID,omitempty"`
@ -502,44 +502,44 @@ func (m *Duration) String() string { return proto.CompactTextString(m) }
func (*Duration) ProtoMessage() {} func (*Duration) ProtoMessage() {}
func (*Duration) Descriptor() ([]byte, []int) { func (*Duration) Descriptor() ([]byte, []int) {
return fileDescriptor_a0b84a42fa06f626, []int{9} return fileDescriptor_a0b84a42fa06f626, []int{9}
func (m *EvilLightwalletdState) Reset() { *m = EvilLightwalletdState{} } func (m *DarksideLightwalletdState) Reset() { *m = DarksideLightwalletdState{} }
func (m *EvilLightwalletdState) String() string { return proto.CompactTextString(m) } func (m *DarksideLightwalletdState) String() string { return proto.CompactTextString(m) }
func (*EvilLightwalletdState) ProtoMessage() {} func (*DarksideLightwalletdState) ProtoMessage() {}
func (*EvilLightwalletdState) Descriptor() ([]byte, []int) { func (*DarksideLightwalletdState) Descriptor() ([]byte, []int) {
return fileDescriptor_a0b84a42fa06f626, []int{10} return fileDescriptor_a0b84a42fa06f626, []int{10}
} }
func (m *Duration) XXX_Unmarshal(b []byte) error { func (m *Duration) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Duration.Unmarshal(m, b) return xxx_messageInfo_Duration.Unmarshal(m, b)
func (m *EvilLightwalletdState) XXX_Unmarshal(b []byte) error { func (m *DarksideLightwalletdState) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EvilLightwalletdState.Unmarshal(m, b) return xxx_messageInfo_DarksideLightwalletdState.Unmarshal(m, b)
} }
func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Duration.Marshal(b, m, deterministic) return xxx_messageInfo_Duration.Marshal(b, m, deterministic)
func (m *EvilLightwalletdState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *DarksideLightwalletdState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EvilLightwalletdState.Marshal(b, m, deterministic) return xxx_messageInfo_DarksideLightwalletdState.Marshal(b, m, deterministic)
} }
func (m *Duration) XXX_Merge(src proto.Message) { func (m *Duration) XXX_Merge(src proto.Message) {
xxx_messageInfo_Duration.Merge(m, src) xxx_messageInfo_Duration.Merge(m, src)
func (m *EvilLightwalletdState) XXX_Merge(src proto.Message) { func (m *DarksideLightwalletdState) XXX_Merge(src proto.Message) {
xxx_messageInfo_EvilLightwalletdState.Merge(m, src) xxx_messageInfo_DarksideLightwalletdState.Merge(m, src)
} }
func (m *Duration) XXX_Size() int { func (m *Duration) XXX_Size() int {
return xxx_messageInfo_Duration.Size(m) return xxx_messageInfo_Duration.Size(m)
func (m *EvilLightwalletdState) XXX_Size() int { func (m *DarksideLightwalletdState) XXX_Size() int {
return xxx_messageInfo_EvilLightwalletdState.Size(m) return xxx_messageInfo_DarksideLightwalletdState.Size(m)
} }
func (m *Duration) XXX_DiscardUnknown() { func (m *Duration) XXX_DiscardUnknown() {
xxx_messageInfo_Duration.DiscardUnknown(m) xxx_messageInfo_Duration.DiscardUnknown(m)
func (m *EvilLightwalletdState) XXX_DiscardUnknown() { func (m *DarksideLightwalletdState) XXX_DiscardUnknown() {
xxx_messageInfo_EvilLightwalletdState.DiscardUnknown(m) xxx_messageInfo_DarksideLightwalletdState.DiscardUnknown(m)
} }
var xxx_messageInfo_Duration proto.InternalMessageInfo var xxx_messageInfo_Duration proto.InternalMessageInfo
var xxx_messageInfo_EvilLightwalletdState proto.InternalMessageInfo var xxx_messageInfo_DarksideLightwalletdState proto.InternalMessageInfo
func (m *Duration) GetIntervalUs() int64 { func (m *Duration) GetIntervalUs() int64 {
func (m *EvilLightwalletdState) GetStartHeight() int32 { func (m *DarksideLightwalletdState) GetStartHeight() int32 {
if m != nil { if m != nil {
return m.IntervalUs return m.IntervalUs
return m.StartHeight return m.StartHeight
@ -556,7 +556,7 @@ type PingResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
func (m *EvilLightwalletdState) GetSaplingActivation() int32 { func (m *DarksideLightwalletdState) GetSaplingActivation() int32 {
if m != nil { if m != nil {
return m.SaplingActivation return m.SaplingActivation
} }
@ -568,7 +568,7 @@ func (m *PingResponse) String() string { return proto.CompactTextString(m) }
func (*PingResponse) ProtoMessage() {} func (*PingResponse) ProtoMessage() {}
func (*PingResponse) Descriptor() ([]byte, []int) { func (*PingResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_a0b84a42fa06f626, []int{10} return fileDescriptor_a0b84a42fa06f626, []int{10}
func (m *EvilLightwalletdState) GetBranchID() string { func (m *DarksideLightwalletdState) GetBranchID() string {
if m != nil { if m != nil {
return m.BranchID return m.BranchID
} }
@ -594,7 +594,7 @@ func (m *PingResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_PingResponse proto.InternalMessageInfo var xxx_messageInfo_PingResponse proto.InternalMessageInfo
func (m *PingResponse) GetEntry() int64 { func (m *PingResponse) GetEntry() int64 {
func (m *EvilLightwalletdState) GetChainName() string { func (m *DarksideLightwalletdState) GetChainName() string {
if m != nil { if m != nil {
return m.Entry return m.Entry
return m.ChainName return m.ChainName
@ -604,7 +604,7 @@ func (m *EvilLightwalletdState) GetChainName() string {
} }
func (m *PingResponse) GetExit() int64 { func (m *PingResponse) GetExit() int64 {
func (m *EvilLightwalletdState) GetBlocks() []string { func (m *DarksideLightwalletdState) GetBlocks() []string {
if m != nil { if m != nil {
return m.Exit return m.Exit
return m.Blocks return m.Blocks
@ -625,7 +625,7 @@ func init() {
proto.RegisterType((*TransparentAddressBlockFilter)(nil), "cash.z.wallet.sdk.rpc.TransparentAddressBlockFilter") proto.RegisterType((*TransparentAddressBlockFilter)(nil), "cash.z.wallet.sdk.rpc.TransparentAddressBlockFilter")
proto.RegisterType((*Duration)(nil), "cash.z.wallet.sdk.rpc.Duration") proto.RegisterType((*Duration)(nil), "cash.z.wallet.sdk.rpc.Duration")
proto.RegisterType((*PingResponse)(nil), "cash.z.wallet.sdk.rpc.PingResponse") proto.RegisterType((*PingResponse)(nil), "cash.z.wallet.sdk.rpc.PingResponse")
proto.RegisterType((*EvilLightwalletdState)(nil), "cash.z.wallet.sdk.rpc.EvilLightwalletdState") proto.RegisterType((*DarksideLightwalletdState)(nil), "cash.z.wallet.sdk.rpc.DarksideLightwalletdState")
} }
func init() { func init() {
@ -679,55 +679,55 @@ var fileDescriptor_a0b84a42fa06f626 = []byte{
0x72, 0x79, 0xc9, 0x0e, 0x06, 0x2d, 0xec, 0x2d, 0x9e, 0xd5, 0x5d, 0x80, 0x4c, 0xfc, 0xdf, 0xa5, 0x72, 0x79, 0xc9, 0x0e, 0x06, 0x2d, 0xec, 0x2d, 0x9e, 0xd5, 0x5d, 0x80, 0x4c, 0xfc, 0xdf, 0xa5,
0xc2, 0xc5, 0x9c, 0xfd, 0x5b, 0xbd, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xd2, 0xc0, 0xf7, 0xc2, 0xc5, 0x9c, 0xfd, 0x5b, 0xbd, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xd2, 0xc0, 0xf7,
0xec, 0x06, 0x00, 0x00, 0xec, 0x06, 0x00, 0x00,
// 756 bytes of a gzipped FileDescriptorProto // 760 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0xd7, 0x0e, 0xcd, 0xc7, 0xc1, 0xfb, 0x52, 0xe1, 0xb6, 0x82, 0x7f, 0xee, 0x5f, 0x3e, 0x05, 0x00, 0x00, 0xff, 0xff,
0xe8, 0x07, 0x00, 0x00, 0x18, 0x08, 0xc2, 0x0c, 0xf8, 0x07, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -758,9 +758,9 @@ type CompactTxStreamerClient interface {
GetLightdInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*LightdInfo, error) GetLightdInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*LightdInfo, error)
// Testing-only // Testing-only
Ping(ctx context.Context, in *Duration, opts ...grpc.CallOption) (*PingResponse, error) Ping(ctx context.Context, in *Duration, opts ...grpc.CallOption) (*PingResponse, error)
// Evil // Darkside
EvilGetIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (CompactTxStreamer_EvilGetIncomingTransactionsClient, error) DarksideGetIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (CompactTxStreamer_DarksideGetIncomingTransactionsClient, error)
EvilSetState(ctx context.Context, in *EvilLightwalletdState, opts ...grpc.CallOption) (*Empty, error) DarksideSetState(ctx context.Context, in *DarksideLightwalletdState, opts ...grpc.CallOption) (*Empty, error)
} }
type compactTxStreamerClient struct { type compactTxStreamerClient struct {
@ -883,12 +883,12 @@ func (c *compactTxStreamerClient) GetLightdInfo(ctx context.Context, in *Empty,
func (c *compactTxStreamerClient) Ping(ctx context.Context, in *Duration, opts ...grpc.CallOption) (*PingResponse, error) { func (c *compactTxStreamerClient) Ping(ctx context.Context, in *Duration, opts ...grpc.CallOption) (*PingResponse, error) {
out := new(PingResponse) out := new(PingResponse)
err := c.cc.Invoke(ctx, "/cash.z.wallet.sdk.rpc.CompactTxStreamer/Ping", in, out, opts...) err := c.cc.Invoke(ctx, "/cash.z.wallet.sdk.rpc.CompactTxStreamer/Ping", in, out, opts...)
func (c *compactTxStreamerClient) EvilGetIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (CompactTxStreamer_EvilGetIncomingTransactionsClient, error) { func (c *compactTxStreamerClient) DarksideGetIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (CompactTxStreamer_DarksideGetIncomingTransactionsClient, error) {
stream, err := c.cc.NewStream(ctx, &_CompactTxStreamer_serviceDesc.Streams[2], "/cash.z.wallet.sdk.rpc.CompactTxStreamer/EvilGetIncomingTransactions", opts...) stream, err := c.cc.NewStream(ctx, &_CompactTxStreamer_serviceDesc.Streams[2], "/cash.z.wallet.sdk.rpc.CompactTxStreamer/DarksideGetIncomingTransactions", opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &compactTxStreamerEvilGetIncomingTransactionsClient{stream} x := &compactTxStreamerDarksideGetIncomingTransactionsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil { if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err return nil, err
} }
@ -898,16 +898,16 @@ func (c *compactTxStreamerClient) EvilGetIncomingTransactions(ctx context.Contex
return x, nil return x, nil
} }
type CompactTxStreamer_EvilGetIncomingTransactionsClient interface { type CompactTxStreamer_DarksideGetIncomingTransactionsClient interface {
Recv() (*RawTransaction, error) Recv() (*RawTransaction, error)
grpc.ClientStream grpc.ClientStream
} }
type compactTxStreamerEvilGetIncomingTransactionsClient struct { type compactTxStreamerDarksideGetIncomingTransactionsClient struct {
grpc.ClientStream grpc.ClientStream
} }
func (x *compactTxStreamerEvilGetIncomingTransactionsClient) Recv() (*RawTransaction, error) { func (x *compactTxStreamerDarksideGetIncomingTransactionsClient) Recv() (*RawTransaction, error) {
m := new(RawTransaction) m := new(RawTransaction)
if err := x.ClientStream.RecvMsg(m); err != nil { if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err return nil, err
@ -915,9 +915,9 @@ func (x *compactTxStreamerEvilGetIncomingTransactionsClient) Recv() (*RawTransac
return m, nil return m, nil
} }
func (c *compactTxStreamerClient) EvilSetState(ctx context.Context, in *EvilLightwalletdState, opts ...grpc.CallOption) (*Empty, error) { func (c *compactTxStreamerClient) DarksideSetState(ctx context.Context, in *DarksideLightwalletdState, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty) out := new(Empty)
err := c.cc.Invoke(ctx, "/cash.z.wallet.sdk.rpc.CompactTxStreamer/EvilSetState", in, out, opts...) err := c.cc.Invoke(ctx, "/cash.z.wallet.sdk.rpc.CompactTxStreamer/DarksideSetState", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -942,9 +942,9 @@ type CompactTxStreamerServer interface {
GetLightdInfo(context.Context, *Empty) (*LightdInfo, error) GetLightdInfo(context.Context, *Empty) (*LightdInfo, error)
// Testing-only // Testing-only
Ping(context.Context, *Duration) (*PingResponse, error) Ping(context.Context, *Duration) (*PingResponse, error)
// Evil // Darkside
EvilGetIncomingTransactions(*Empty, CompactTxStreamer_EvilGetIncomingTransactionsServer) error DarksideGetIncomingTransactions(*Empty, CompactTxStreamer_DarksideGetIncomingTransactionsServer) error
EvilSetState(context.Context, *EvilLightwalletdState) (*Empty, error) DarksideSetState(context.Context, *DarksideLightwalletdState) (*Empty, error)
} }
// UnimplementedCompactTxStreamerServer can be embedded to have forward compatible implementations. // UnimplementedCompactTxStreamerServer can be embedded to have forward compatible implementations.
@ -974,11 +974,11 @@ func (*UnimplementedCompactTxStreamerServer) GetLightdInfo(ctx context.Context,
} }
func (*UnimplementedCompactTxStreamerServer) Ping(ctx context.Context, req *Duration) (*PingResponse, error) { func (*UnimplementedCompactTxStreamerServer) Ping(ctx context.Context, req *Duration) (*PingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
func (*UnimplementedCompactTxStreamerServer) EvilGetIncomingTransactions(req *Empty, srv CompactTxStreamer_EvilGetIncomingTransactionsServer) error { func (*UnimplementedCompactTxStreamerServer) DarksideGetIncomingTransactions(req *Empty, srv CompactTxStreamer_DarksideGetIncomingTransactionsServer) error {
return status.Errorf(codes.Unimplemented, "method EvilGetIncomingTransactions not implemented") return status.Errorf(codes.Unimplemented, "method DarksideGetIncomingTransactions not implemented")
} }
func (*UnimplementedCompactTxStreamerServer) EvilSetState(ctx context.Context, req *EvilLightwalletdState) (*Empty, error) { func (*UnimplementedCompactTxStreamerServer) DarksideSetState(ctx context.Context, req *DarksideLightwalletdState) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method EvilSetState not implemented") return nil, status.Errorf(codes.Unimplemented, "method DarksideSetState not implemented")
} }
func RegisterCompactTxStreamerServer(s *grpc.Server, srv CompactTxStreamerServer) { func RegisterCompactTxStreamerServer(s *grpc.Server, srv CompactTxStreamerServer) {
@ -1119,44 +1119,44 @@ func _CompactTxStreamer_GetLightdInfo_Handler(srv interface{}, ctx context.Conte
func _CompactTxStreamer_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _CompactTxStreamer_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Duration) in := new(Duration)
func _CompactTxStreamer_EvilGetIncomingTransactions_Handler(srv interface{}, stream grpc.ServerStream) error { func _CompactTxStreamer_DarksideGetIncomingTransactions_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(Empty) m := new(Empty)
if err := stream.RecvMsg(m); err != nil { if err := stream.RecvMsg(m); err != nil {
return err return err
} }
return srv.(CompactTxStreamerServer).EvilGetIncomingTransactions(m, &compactTxStreamerEvilGetIncomingTransactionsServer{stream}) return srv.(CompactTxStreamerServer).DarksideGetIncomingTransactions(m, &compactTxStreamerDarksideGetIncomingTransactionsServer{stream})
} }
type CompactTxStreamer_EvilGetIncomingTransactionsServer interface { type CompactTxStreamer_DarksideGetIncomingTransactionsServer interface {
Send(*RawTransaction) error Send(*RawTransaction) error
grpc.ServerStream grpc.ServerStream
} }
type compactTxStreamerEvilGetIncomingTransactionsServer struct { type compactTxStreamerDarksideGetIncomingTransactionsServer struct {
grpc.ServerStream grpc.ServerStream
} }
func (x *compactTxStreamerEvilGetIncomingTransactionsServer) Send(m *RawTransaction) error { func (x *compactTxStreamerDarksideGetIncomingTransactionsServer) Send(m *RawTransaction) error {
return x.ServerStream.SendMsg(m) return x.ServerStream.SendMsg(m)
} }
func _CompactTxStreamer_EvilSetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _CompactTxStreamer_DarksideSetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EvilLightwalletdState) in := new(DarksideLightwalletdState)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(CompactTxStreamerServer).Ping(ctx, in) return srv.(CompactTxStreamerServer).Ping(ctx, in)
return srv.(CompactTxStreamerServer).EvilSetState(ctx, in) return srv.(CompactTxStreamerServer).DarksideSetState(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/Ping", FullMethod: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/Ping",
FullMethod: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/EvilSetState", FullMethod: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/DarksideSetState",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CompactTxStreamerServer).Ping(ctx, req.(*Duration)) return srv.(CompactTxStreamerServer).Ping(ctx, req.(*Duration))
return srv.(CompactTxStreamerServer).EvilSetState(ctx, req.(*EvilLightwalletdState)) return srv.(CompactTxStreamerServer).DarksideSetState(ctx, req.(*DarksideLightwalletdState))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
@ -1188,8 +1188,8 @@ var _CompactTxStreamer_serviceDesc = grpc.ServiceDesc{
{ {
MethodName: "Ping", MethodName: "Ping",
Handler: _CompactTxStreamer_Ping_Handler, Handler: _CompactTxStreamer_Ping_Handler,
MethodName: "EvilSetState", MethodName: "DarksideSetState",
Handler: _CompactTxStreamer_EvilSetState_Handler, Handler: _CompactTxStreamer_DarksideSetState_Handler,
}, },
}, },
Streams: []grpc.StreamDesc{ Streams: []grpc.StreamDesc{
@ -1204,8 +1204,8 @@ var _CompactTxStreamer_serviceDesc = grpc.ServiceDesc{
ServerStreams: true, ServerStreams: true,
}, },
{ {
StreamName: "EvilGetIncomingTransactions", StreamName: "DarksideGetIncomingTransactions",
Handler: _CompactTxStreamer_EvilGetIncomingTransactions_Handler, Handler: _CompactTxStreamer_DarksideGetIncomingTransactions_Handler,
ServerStreams: true, ServerStreams: true,
}, },
}, },

View File

@ -86,13 +86,14 @@ message PingResponse {
int64 exit = 2; int64 exit = 2;
} }
message EvilLightwalletdState { message DarksideLightwalletdState {
int32 startHeight = 1; int32 startHeight = 1;
int32 saplingActivation = 2; int32 saplingActivation = 2;
string branchID = 3; string branchID = 3;
string chainName = 4; string chainName = 4;
repeated string blocks = 5; repeated string blocks = 5;
} }
service CompactTxStreamer { service CompactTxStreamer {
// Return the height of the tip of the best chain // Return the height of the tip of the best chain
rpc GetLatestBlock(ChainSpec) returns (BlockID) {} rpc GetLatestBlock(ChainSpec) returns (BlockID) {}
@ -114,7 +115,7 @@ service CompactTxStreamer {
// Testing-only // Testing-only
rpc Ping(Duration) returns (PingResponse) {} rpc Ping(Duration) returns (PingResponse) {}
// Evil // Darkside
rpc EvilGetIncomingTransactions(Empty) returns (stream RawTransaction) {} rpc DarksideGetIncomingTransactions(Empty) returns (stream RawTransaction) {}
rpc EvilSetState(EvilLightwalletdState) returns (Empty) {} rpc DarksideSetState(DarksideLightwalletdState) returns (Empty) {}
} }