From dfab8146e75fd47aa21519bd51daad0905446792 Mon Sep 17 00:00:00 2001 From: jholdstock Date: Mon, 9 Sep 2024 09:55:18 +0100 Subject: [PATCH] multi: Remove references to v2 ticket buyer. There is currently only a single implementation of ticket buyer, and all references to old implementations have been removed. There is therefore no longer any need to reference v2 (or even v3) ticket buyers. --- internal/rpc/rpcserver/server.go | 36 +++---- rpc/api.proto | 2 +- rpc/documentation/api.md | 12 +-- rpc/walletrpc/api.pb.go | 164 +++++++++++++++---------------- rpc/walletrpc/api_grpc.pb.go | 74 +++++++------- rpcserver.go | 4 +- 6 files changed, 146 insertions(+), 146 deletions(-) diff --git a/internal/rpc/rpcserver/server.go b/internal/rpc/rpcserver/server.go index c81d3fbe3..031007394 100644 --- a/internal/rpc/rpcserver/server.go +++ b/internal/rpc/rpcserver/server.go @@ -209,10 +209,10 @@ type accountMixerServer struct { // ticketbuyerServer provides RPC clients with the ability to start/stop the // automatic ticket buyer service. -type ticketbuyerV2Server struct { +type ticketbuyerServer struct { ready atomic.Uint32 loader *loader.Loader - pb.UnimplementedTicketBuyerV2ServiceServer + pb.UnimplementedTicketBuyerServiceServer } type agendaServer struct { @@ -255,7 +255,7 @@ var ( loaderService loaderServer seedService seedServer accountMixerService accountMixerServer - ticketBuyerV2Service ticketbuyerV2Server + ticketBuyerService ticketbuyerServer agendaService agendaServer votingService votingServer messageVerificationService messageVerificationServer @@ -271,7 +271,7 @@ func RegisterServices(server *grpc.Server) { pb.RegisterWalletLoaderServiceServer(server, &loaderService) pb.RegisterSeedServiceServer(server, &seedService) pb.RegisterAccountMixerServiceServer(server, &accountMixerService) - pb.RegisterTicketBuyerV2ServiceServer(server, &ticketBuyerV2Service) + pb.RegisterTicketBuyerServiceServer(server, &ticketBuyerService) pb.RegisterAgendaServiceServer(server, &agendaService) pb.RegisterVotingServiceServer(server, &votingService) pb.RegisterMessageVerificationServiceServer(server, &messageVerificationService) @@ -285,7 +285,7 @@ var serviceMap = map[string]any{ "walletrpc.WalletLoaderService": &loaderService, "walletrpc.SeedService": &seedService, "walletrpc.AccountMixerService": &accountMixerService, - "walletrpc.TicketBuyerV2Service": &ticketBuyerV2Service, + "walletrpc.TicketBuyerService": &ticketBuyerService, "walletrpc.AgendaService": &agendaService, "walletrpc.VotingService": &votingService, "walletrpc.MessageVerificationService": &messageVerificationService, @@ -2573,7 +2573,7 @@ func (t *accountMixerServer) RunAccountMixer(req *pb.RunAccountMixerRequest, svr tb := ticketbuyer.New(wallet) - // Set ticketbuyerV2 config + // Set ticketbuyer config tb.AccessConfig(func(c *ticketbuyer.Config) { c.Mixing = req.CsppServer != "" c.MixedAccountBranch = req.MixedAccountBranch @@ -2613,16 +2613,16 @@ func (t *accountMixerServer) checkReady() bool { return t.ready.Load() != 0 } -// StartTicketBuyerV2Service starts the TicketBuyerV2Service. -func StartTicketBuyerV2Service(server *grpc.Server, loader *loader.Loader) { - ticketBuyerV2Service.loader = loader - if ticketBuyerV2Service.ready.Swap(1) != 0 { +// StartTicketBuyerService starts the TicketBuyerService. +func StartTicketBuyerService(server *grpc.Server, loader *loader.Loader) { + ticketBuyerService.loader = loader + if ticketBuyerService.ready.Swap(1) != 0 { panic("service already started") } } -// StartTicketBuyer starts the automatic ticket buyer for the v2 service. -func (t *ticketbuyerV2Server) RunTicketBuyer(req *pb.RunTicketBuyerRequest, svr pb.TicketBuyerV2Service_RunTicketBuyerServer) error { +// RunTicketBuyer starts the automatic ticket buyer. +func (t *ticketbuyerServer) RunTicketBuyer(req *pb.RunTicketBuyerRequest, svr pb.TicketBuyerService_RunTicketBuyerServer) error { wallet, ok := t.loader.LoadedWallet() if !ok { return status.Errorf(codes.FailedPrecondition, "Wallet has not been loaded") @@ -2668,7 +2668,7 @@ func (t *ticketbuyerV2Server) RunTicketBuyer(req *pb.RunTicketBuyerRequest, svr } vspClient, err = loader.VSP(cfg) if err != nil { - return status.Errorf(codes.Unknown, "TicketBuyerV3 instance failed to start. Error: %v", err) + return status.Errorf(codes.Unknown, "TicketBuyer instance failed to start. Error: %v", err) } } if req.BalanceToMaintain < 0 { @@ -2714,7 +2714,7 @@ func (t *ticketbuyerV2Server) RunTicketBuyer(req *pb.RunTicketBuyerRequest, svr limit := int(req.Limit) tb := ticketbuyer.New(wallet) - // Set ticketbuyerV2 config + // Set ticketbuyer config tb.AccessConfig(func(c *ticketbuyer.Config) { c.BuyTickets = true c.Account = req.Account @@ -2749,15 +2749,15 @@ func (t *ticketbuyerV2Server) RunTicketBuyer(req *pb.RunTicketBuyerRequest, svr err = tb.Run(svr.Context(), req.Passphrase) if err != nil { if svr.Context().Err() != nil { - return status.Errorf(codes.Canceled, "TicketBuyerV2 instance canceled, account number: %v", req.Account) + return status.Errorf(codes.Canceled, "TicketBuyer instance canceled, account number: %v", req.Account) } - return status.Errorf(codes.Unknown, "TicketBuyerV2 instance errored: %v", err) + return status.Errorf(codes.Unknown, "TicketBuyer instance errored: %v", err) } return nil } -func (t *ticketbuyerV2Server) checkReady() bool { +func (t *ticketbuyerServer) checkReady() bool { return t.ready.Load() != 0 } @@ -4157,7 +4157,7 @@ func (s *walletServer) SyncVSPFailedTickets(ctx context.Context, req *pb.SyncVSP } vspClient, err := loader.VSP(cfg) if err != nil { - return nil, status.Errorf(codes.Unknown, "TicketBuyerV3 instance failed to start. Error: %v", err) + return nil, status.Errorf(codes.Unknown, "TicketBuyer instance failed to start. Error: %v", err) } // Process tickets fee if needed. diff --git a/rpc/api.proto b/rpc/api.proto index 804131de7..02db110f1 100644 --- a/rpc/api.proto +++ b/rpc/api.proto @@ -106,7 +106,7 @@ service WalletLoaderService { service AccountMixerService { rpc RunAccountMixer (RunAccountMixerRequest) returns (stream RunAccountMixerResponse); } -service TicketBuyerV2Service { +service TicketBuyerService { rpc RunTicketBuyer (RunTicketBuyerRequest) returns (stream RunTicketBuyerResponse); } diff --git a/rpc/documentation/api.md b/rpc/documentation/api.md index e55a68167..a4217a95c 100644 --- a/rpc/documentation/api.md +++ b/rpc/documentation/api.md @@ -35,7 +35,7 @@ existing wallet. - [`WalletLoaderService`](#walletloaderservice) - [`WalletService`](#walletservice) - [`SeedService`](#seedservice) -- [`TicketBuyerV2Service`](#ticketbuyerv2service) +- [`TicketBuyerService`](#ticketbuyerservice) - [`AgendaService`](#agendaservice) - [`VotingService`](#votingservice) - [`MessageVerificationService`](#messageverificationservice) @@ -2781,10 +2781,10 @@ The user input can be either a hexadecimal string or a mnemonic word list. - `InvalidArgument`: The input is invalid. -## `TicketBuyerV2Service` +## `TicketBuyerService` -The `TicketBuyerV2Service` service provides RPC clients with the ability to -launch the V2 ticket buyer. +The `TicketBuyerService` service provides RPC clients with the ability to +launch the ticket buyer. **Methods:** @@ -2794,7 +2794,7 @@ launch the V2 ticket buyer. #### `RunTicketBuyer` -The `RunTicketBuyer` starts a new V2 ticket buyer for the specified account. +The `RunTicketBuyer` starts a new ticket buyer for the specified account. The users may specify a balance to maintain. **Request:** `RunTicketBuyerRequest` @@ -2824,7 +2824,7 @@ The users may specify a balance to maintain. ## `AccountMixerService` The `AccountMixerService` service provides RPC clients with the ability to -launch the V2 ticket buyer. +launch the ticket buyer. **Methods:** diff --git a/rpc/walletrpc/api.pb.go b/rpc/walletrpc/api.pb.go index 64f6e8e1e..741772933 100644 --- a/rpc/walletrpc/api.pb.go +++ b/rpc/walletrpc/api.pb.go @@ -16091,89 +16091,89 @@ var file_api_proto_rawDesc = []byte{ 0x78, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x69, 0x78, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x32, 0x6f, 0x0a, 0x14, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x65, 0x72, 0x56, - 0x32, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x54, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, + 0x32, 0x6d, 0x0a, 0x12, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, + 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x42, 0x75, 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x54, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x42, 0x75, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x32, 0xbb, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x61, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, - 0x64, 0x6f, 0x6d, 0x53, 0x65, 0x65, 0x64, 0x12, 0x24, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x53, 0x65, - 0x65, 0x64, 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, - 0x65, 0x63, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x63, - 0x6f, 0x64, 0x65, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0x51, 0x0a, 0x0d, 0x41, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x40, 0x0a, 0x07, 0x41, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x73, 0x12, 0x19, 0x2e, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xa2, 0x04, 0x0a, 0x0d, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x56, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x56, - 0x6f, 0x74, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x42, 0x75, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x32, + 0xbb, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x61, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, + 0x6d, 0x53, 0x65, 0x65, 0x64, 0x12, 0x24, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, + 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x65, 0x64, + 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x63, + 0x6f, 0x64, 0x65, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, + 0x65, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x51, 0x0a, + 0x0d, 0x41, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x40, + 0x0a, 0x07, 0x41, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x73, 0x12, 0x19, 0x2e, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0xa2, 0x04, 0x0a, 0x0d, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x73, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x6f, + 0x74, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x6f, 0x74, + 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x55, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x65, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0e, 0x54, 0x53, 0x70, - 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x77, 0x61, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0e, 0x54, 0x53, 0x70, 0x65, 0x6e, + 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x53, 0x70, 0x65, 0x6e, 0x64, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x58, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x54, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x65, 0x74, 0x54, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x10, 0x54, 0x72, - 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x22, - 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x65, 0x61, 0x73, - 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, - 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x54, 0x72, - 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x23, 0x2e, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x72, 0x65, 0x61, - 0x73, 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, - 0x74, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x70, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x5e, 0x0a, 0x0e, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x7f, 0x0a, 0x14, 0x44, 0x65, 0x63, - 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x67, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x61, 0x77, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x61, 0x77, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, - 0x63, 0x6f, 0x64, 0x65, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x64, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x72, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x2f, 0x76, 0x35, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, + 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x54, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x74, 0x54, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x74, 0x54, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x10, 0x54, 0x72, 0x65, 0x61, + 0x73, 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, + 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x65, + 0x61, 0x73, 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x54, 0x72, 0x65, 0x61, + 0x73, 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x23, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, + 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x54, + 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x70, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x5e, 0x0a, 0x0e, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x47, 0x65, 0x74, + 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x7f, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6f, 0x64, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x67, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x63, 0x6f, + 0x64, 0x65, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x64, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x72, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x2f, 0x76, 0x35, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, + 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -16571,7 +16571,7 @@ var file_api_proto_depIdxs = []int32{ 126, // 136: walletrpc.WalletLoaderService.RpcSync:input_type -> walletrpc.RpcSyncRequest 130, // 137: walletrpc.WalletLoaderService.RescanPoint:input_type -> walletrpc.RescanPointRequest 138, // 138: walletrpc.AccountMixerService.RunAccountMixer:input_type -> walletrpc.RunAccountMixerRequest - 136, // 139: walletrpc.TicketBuyerV2Service.RunTicketBuyer:input_type -> walletrpc.RunTicketBuyerRequest + 136, // 139: walletrpc.TicketBuyerService.RunTicketBuyer:input_type -> walletrpc.RunTicketBuyerRequest 132, // 140: walletrpc.SeedService.GenerateRandomSeed:input_type -> walletrpc.GenerateRandomSeedRequest 134, // 141: walletrpc.SeedService.DecodeSeed:input_type -> walletrpc.DecodeSeedRequest 140, // 142: walletrpc.AgendaService.Agendas:input_type -> walletrpc.AgendasRequest @@ -16661,7 +16661,7 @@ var file_api_proto_depIdxs = []int32{ 127, // 226: walletrpc.WalletLoaderService.RpcSync:output_type -> walletrpc.RpcSyncResponse 131, // 227: walletrpc.WalletLoaderService.RescanPoint:output_type -> walletrpc.RescanPointResponse 139, // 228: walletrpc.AccountMixerService.RunAccountMixer:output_type -> walletrpc.RunAccountMixerResponse - 137, // 229: walletrpc.TicketBuyerV2Service.RunTicketBuyer:output_type -> walletrpc.RunTicketBuyerResponse + 137, // 229: walletrpc.TicketBuyerService.RunTicketBuyer:output_type -> walletrpc.RunTicketBuyerResponse 133, // 230: walletrpc.SeedService.GenerateRandomSeed:output_type -> walletrpc.GenerateRandomSeedResponse 135, // 231: walletrpc.SeedService.DecodeSeed:output_type -> walletrpc.DecodeSeedResponse 141, // 232: walletrpc.AgendaService.Agendas:output_type -> walletrpc.AgendasResponse diff --git a/rpc/walletrpc/api_grpc.pb.go b/rpc/walletrpc/api_grpc.pb.go index 7d6af46cb..98c2cefd7 100644 --- a/rpc/walletrpc/api_grpc.pb.go +++ b/rpc/walletrpc/api_grpc.pb.go @@ -3300,27 +3300,27 @@ var AccountMixerService_ServiceDesc = grpc.ServiceDesc{ Metadata: "api.proto", } -// TicketBuyerV2ServiceClient is the client API for TicketBuyerV2Service service. +// TicketBuyerServiceClient is the client API for TicketBuyerService 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 TicketBuyerV2ServiceClient interface { - RunTicketBuyer(ctx context.Context, in *RunTicketBuyerRequest, opts ...grpc.CallOption) (TicketBuyerV2Service_RunTicketBuyerClient, error) +type TicketBuyerServiceClient interface { + RunTicketBuyer(ctx context.Context, in *RunTicketBuyerRequest, opts ...grpc.CallOption) (TicketBuyerService_RunTicketBuyerClient, error) } -type ticketBuyerV2ServiceClient struct { +type ticketBuyerServiceClient struct { cc grpc.ClientConnInterface } -func NewTicketBuyerV2ServiceClient(cc grpc.ClientConnInterface) TicketBuyerV2ServiceClient { - return &ticketBuyerV2ServiceClient{cc} +func NewTicketBuyerServiceClient(cc grpc.ClientConnInterface) TicketBuyerServiceClient { + return &ticketBuyerServiceClient{cc} } -func (c *ticketBuyerV2ServiceClient) RunTicketBuyer(ctx context.Context, in *RunTicketBuyerRequest, opts ...grpc.CallOption) (TicketBuyerV2Service_RunTicketBuyerClient, error) { - stream, err := c.cc.NewStream(ctx, &TicketBuyerV2Service_ServiceDesc.Streams[0], "/walletrpc.TicketBuyerV2Service/RunTicketBuyer", opts...) +func (c *ticketBuyerServiceClient) RunTicketBuyer(ctx context.Context, in *RunTicketBuyerRequest, opts ...grpc.CallOption) (TicketBuyerService_RunTicketBuyerClient, error) { + stream, err := c.cc.NewStream(ctx, &TicketBuyerService_ServiceDesc.Streams[0], "/walletrpc.TicketBuyerService/RunTicketBuyer", opts...) if err != nil { return nil, err } - x := &ticketBuyerV2ServiceRunTicketBuyerClient{stream} + x := &ticketBuyerServiceRunTicketBuyerClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -3330,16 +3330,16 @@ func (c *ticketBuyerV2ServiceClient) RunTicketBuyer(ctx context.Context, in *Run return x, nil } -type TicketBuyerV2Service_RunTicketBuyerClient interface { +type TicketBuyerService_RunTicketBuyerClient interface { Recv() (*RunTicketBuyerResponse, error) grpc.ClientStream } -type ticketBuyerV2ServiceRunTicketBuyerClient struct { +type ticketBuyerServiceRunTicketBuyerClient struct { grpc.ClientStream } -func (x *ticketBuyerV2ServiceRunTicketBuyerClient) Recv() (*RunTicketBuyerResponse, error) { +func (x *ticketBuyerServiceRunTicketBuyerClient) Recv() (*RunTicketBuyerResponse, error) { m := new(RunTicketBuyerResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -3347,66 +3347,66 @@ func (x *ticketBuyerV2ServiceRunTicketBuyerClient) Recv() (*RunTicketBuyerRespon return m, nil } -// TicketBuyerV2ServiceServer is the server API for TicketBuyerV2Service service. -// All implementations must embed UnimplementedTicketBuyerV2ServiceServer +// TicketBuyerServiceServer is the server API for TicketBuyerService service. +// All implementations must embed UnimplementedTicketBuyerServiceServer // for forward compatibility -type TicketBuyerV2ServiceServer interface { - RunTicketBuyer(*RunTicketBuyerRequest, TicketBuyerV2Service_RunTicketBuyerServer) error - mustEmbedUnimplementedTicketBuyerV2ServiceServer() +type TicketBuyerServiceServer interface { + RunTicketBuyer(*RunTicketBuyerRequest, TicketBuyerService_RunTicketBuyerServer) error + mustEmbedUnimplementedTicketBuyerServiceServer() } -// UnimplementedTicketBuyerV2ServiceServer must be embedded to have forward compatible implementations. -type UnimplementedTicketBuyerV2ServiceServer struct { +// UnimplementedTicketBuyerServiceServer must be embedded to have forward compatible implementations. +type UnimplementedTicketBuyerServiceServer struct { } -func (UnimplementedTicketBuyerV2ServiceServer) RunTicketBuyer(*RunTicketBuyerRequest, TicketBuyerV2Service_RunTicketBuyerServer) error { +func (UnimplementedTicketBuyerServiceServer) RunTicketBuyer(*RunTicketBuyerRequest, TicketBuyerService_RunTicketBuyerServer) error { return status.Errorf(codes.Unimplemented, "method RunTicketBuyer not implemented") } -func (UnimplementedTicketBuyerV2ServiceServer) mustEmbedUnimplementedTicketBuyerV2ServiceServer() {} +func (UnimplementedTicketBuyerServiceServer) mustEmbedUnimplementedTicketBuyerServiceServer() {} -// UnsafeTicketBuyerV2ServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TicketBuyerV2ServiceServer will +// UnsafeTicketBuyerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TicketBuyerServiceServer will // result in compilation errors. -type UnsafeTicketBuyerV2ServiceServer interface { - mustEmbedUnimplementedTicketBuyerV2ServiceServer() +type UnsafeTicketBuyerServiceServer interface { + mustEmbedUnimplementedTicketBuyerServiceServer() } -func RegisterTicketBuyerV2ServiceServer(s grpc.ServiceRegistrar, srv TicketBuyerV2ServiceServer) { - s.RegisterService(&TicketBuyerV2Service_ServiceDesc, srv) +func RegisterTicketBuyerServiceServer(s grpc.ServiceRegistrar, srv TicketBuyerServiceServer) { + s.RegisterService(&TicketBuyerService_ServiceDesc, srv) } -func _TicketBuyerV2Service_RunTicketBuyer_Handler(srv interface{}, stream grpc.ServerStream) error { +func _TicketBuyerService_RunTicketBuyer_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(RunTicketBuyerRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(TicketBuyerV2ServiceServer).RunTicketBuyer(m, &ticketBuyerV2ServiceRunTicketBuyerServer{stream}) + return srv.(TicketBuyerServiceServer).RunTicketBuyer(m, &ticketBuyerServiceRunTicketBuyerServer{stream}) } -type TicketBuyerV2Service_RunTicketBuyerServer interface { +type TicketBuyerService_RunTicketBuyerServer interface { Send(*RunTicketBuyerResponse) error grpc.ServerStream } -type ticketBuyerV2ServiceRunTicketBuyerServer struct { +type ticketBuyerServiceRunTicketBuyerServer struct { grpc.ServerStream } -func (x *ticketBuyerV2ServiceRunTicketBuyerServer) Send(m *RunTicketBuyerResponse) error { +func (x *ticketBuyerServiceRunTicketBuyerServer) Send(m *RunTicketBuyerResponse) error { return x.ServerStream.SendMsg(m) } -// TicketBuyerV2Service_ServiceDesc is the grpc.ServiceDesc for TicketBuyerV2Service service. +// TicketBuyerService_ServiceDesc is the grpc.ServiceDesc for TicketBuyerService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var TicketBuyerV2Service_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "walletrpc.TicketBuyerV2Service", - HandlerType: (*TicketBuyerV2ServiceServer)(nil), +var TicketBuyerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "walletrpc.TicketBuyerService", + HandlerType: (*TicketBuyerServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "RunTicketBuyer", - Handler: _TicketBuyerV2Service_RunTicketBuyer_Handler, + Handler: _TicketBuyerService_RunTicketBuyer_Handler, ServerStreams: true, }, }, diff --git a/rpcserver.go b/rpcserver.go index 80dba082f..6e3870f90 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -1,5 +1,5 @@ // Copyright (c) 2013-2015 The btcsuite developers -// Copyright (c) 2015-2020 The Decred developers +// Copyright (c) 2015-2024 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. @@ -316,7 +316,7 @@ func startRPCServers(walletLoader *loader.Loader) (*grpc.Server, *jsonrpc.Server ) rpcserver.RegisterServices(server) rpcserver.StartWalletLoaderService(server, walletLoader, activeNet) - rpcserver.StartTicketBuyerV2Service(server, walletLoader) + rpcserver.StartTicketBuyerService(server, walletLoader) rpcserver.StartAccountMixerService(server, walletLoader) rpcserver.StartAgendaService(server, activeNet.Params) rpcserver.StartDecodeMessageService(server, activeNet.Params)