github.com/ava-labs/avalanchego@v1.11.11/proto/pb/vm/vm_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.3.0 4 // - protoc (unknown) 5 // source: vm/vm.proto 6 7 package vm 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 emptypb "google.golang.org/protobuf/types/known/emptypb" 15 ) 16 17 // This is a compile-time assertion to ensure that this generated file 18 // is compatible with the grpc package it is being compiled against. 19 // Requires gRPC-Go v1.32.0 or later. 20 const _ = grpc.SupportPackageIsVersion7 21 22 const ( 23 VM_Initialize_FullMethodName = "/vm.VM/Initialize" 24 VM_SetState_FullMethodName = "/vm.VM/SetState" 25 VM_Shutdown_FullMethodName = "/vm.VM/Shutdown" 26 VM_CreateHandlers_FullMethodName = "/vm.VM/CreateHandlers" 27 VM_Connected_FullMethodName = "/vm.VM/Connected" 28 VM_Disconnected_FullMethodName = "/vm.VM/Disconnected" 29 VM_BuildBlock_FullMethodName = "/vm.VM/BuildBlock" 30 VM_ParseBlock_FullMethodName = "/vm.VM/ParseBlock" 31 VM_GetBlock_FullMethodName = "/vm.VM/GetBlock" 32 VM_SetPreference_FullMethodName = "/vm.VM/SetPreference" 33 VM_Health_FullMethodName = "/vm.VM/Health" 34 VM_Version_FullMethodName = "/vm.VM/Version" 35 VM_AppRequest_FullMethodName = "/vm.VM/AppRequest" 36 VM_AppRequestFailed_FullMethodName = "/vm.VM/AppRequestFailed" 37 VM_AppResponse_FullMethodName = "/vm.VM/AppResponse" 38 VM_AppGossip_FullMethodName = "/vm.VM/AppGossip" 39 VM_Gather_FullMethodName = "/vm.VM/Gather" 40 VM_GetAncestors_FullMethodName = "/vm.VM/GetAncestors" 41 VM_BatchedParseBlock_FullMethodName = "/vm.VM/BatchedParseBlock" 42 VM_GetBlockIDAtHeight_FullMethodName = "/vm.VM/GetBlockIDAtHeight" 43 VM_StateSyncEnabled_FullMethodName = "/vm.VM/StateSyncEnabled" 44 VM_GetOngoingSyncStateSummary_FullMethodName = "/vm.VM/GetOngoingSyncStateSummary" 45 VM_GetLastStateSummary_FullMethodName = "/vm.VM/GetLastStateSummary" 46 VM_ParseStateSummary_FullMethodName = "/vm.VM/ParseStateSummary" 47 VM_GetStateSummary_FullMethodName = "/vm.VM/GetStateSummary" 48 VM_BlockVerify_FullMethodName = "/vm.VM/BlockVerify" 49 VM_BlockAccept_FullMethodName = "/vm.VM/BlockAccept" 50 VM_BlockReject_FullMethodName = "/vm.VM/BlockReject" 51 VM_StateSummaryAccept_FullMethodName = "/vm.VM/StateSummaryAccept" 52 ) 53 54 // VMClient is the client API for VM service. 55 // 56 // 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. 57 type VMClient interface { 58 // ChainVM 59 // 60 // Initialize this VM. 61 Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error) 62 // SetState communicates to VM its next state it starts 63 SetState(ctx context.Context, in *SetStateRequest, opts ...grpc.CallOption) (*SetStateResponse, error) 64 // Shutdown is called when the node is shutting down. 65 Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) 66 // Creates the HTTP handlers for custom chain network calls. 67 CreateHandlers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHandlersResponse, error) 68 Connected(ctx context.Context, in *ConnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 69 Disconnected(ctx context.Context, in *DisconnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 70 // Attempt to create a new block from data contained in the VM. 71 BuildBlock(ctx context.Context, in *BuildBlockRequest, opts ...grpc.CallOption) (*BuildBlockResponse, error) 72 // Attempt to create a block from a stream of bytes. 73 ParseBlock(ctx context.Context, in *ParseBlockRequest, opts ...grpc.CallOption) (*ParseBlockResponse, error) 74 // Attempt to load a block. 75 GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) 76 // Notify the VM of the currently preferred block. 77 SetPreference(ctx context.Context, in *SetPreferenceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 78 // Attempt to verify the health of the VM. 79 Health(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthResponse, error) 80 // Version returns the version of the VM. 81 Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) 82 // Notify this engine of a request for data from [nodeID]. 83 AppRequest(ctx context.Context, in *AppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 84 // Notify this engine that an AppRequest message it sent to [nodeID] with 85 // request ID [requestID] failed. 86 AppRequestFailed(ctx context.Context, in *AppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 87 // Notify this engine of a response to the AppRequest message it sent to 88 // [nodeID] with request ID [requestID]. 89 AppResponse(ctx context.Context, in *AppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 90 // Notify this engine of a gossip message from [nodeID]. 91 AppGossip(ctx context.Context, in *AppGossipMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 92 // Attempts to gather metrics from a VM. 93 Gather(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GatherResponse, error) 94 // BatchedChainVM 95 GetAncestors(ctx context.Context, in *GetAncestorsRequest, opts ...grpc.CallOption) (*GetAncestorsResponse, error) 96 BatchedParseBlock(ctx context.Context, in *BatchedParseBlockRequest, opts ...grpc.CallOption) (*BatchedParseBlockResponse, error) 97 // HeightIndexedChainVM 98 GetBlockIDAtHeight(ctx context.Context, in *GetBlockIDAtHeightRequest, opts ...grpc.CallOption) (*GetBlockIDAtHeightResponse, error) 99 // StateSyncableVM 100 // 101 // StateSyncEnabled indicates whether the state sync is enabled for this VM. 102 StateSyncEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StateSyncEnabledResponse, error) 103 // GetOngoingSyncStateSummary returns an in-progress state summary if it exists. 104 GetOngoingSyncStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetOngoingSyncStateSummaryResponse, error) 105 // GetLastStateSummary returns the latest state summary. 106 GetLastStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLastStateSummaryResponse, error) 107 // ParseStateSummary parses a state summary out of [summaryBytes]. 108 ParseStateSummary(ctx context.Context, in *ParseStateSummaryRequest, opts ...grpc.CallOption) (*ParseStateSummaryResponse, error) 109 // GetStateSummary retrieves the state summary that was generated at height 110 // [summaryHeight]. 111 GetStateSummary(ctx context.Context, in *GetStateSummaryRequest, opts ...grpc.CallOption) (*GetStateSummaryResponse, error) 112 // Block 113 BlockVerify(ctx context.Context, in *BlockVerifyRequest, opts ...grpc.CallOption) (*BlockVerifyResponse, error) 114 BlockAccept(ctx context.Context, in *BlockAcceptRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 115 BlockReject(ctx context.Context, in *BlockRejectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 116 // StateSummary 117 StateSummaryAccept(ctx context.Context, in *StateSummaryAcceptRequest, opts ...grpc.CallOption) (*StateSummaryAcceptResponse, error) 118 } 119 120 type vMClient struct { 121 cc grpc.ClientConnInterface 122 } 123 124 func NewVMClient(cc grpc.ClientConnInterface) VMClient { 125 return &vMClient{cc} 126 } 127 128 func (c *vMClient) Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error) { 129 out := new(InitializeResponse) 130 err := c.cc.Invoke(ctx, VM_Initialize_FullMethodName, in, out, opts...) 131 if err != nil { 132 return nil, err 133 } 134 return out, nil 135 } 136 137 func (c *vMClient) SetState(ctx context.Context, in *SetStateRequest, opts ...grpc.CallOption) (*SetStateResponse, error) { 138 out := new(SetStateResponse) 139 err := c.cc.Invoke(ctx, VM_SetState_FullMethodName, in, out, opts...) 140 if err != nil { 141 return nil, err 142 } 143 return out, nil 144 } 145 146 func (c *vMClient) Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { 147 out := new(emptypb.Empty) 148 err := c.cc.Invoke(ctx, VM_Shutdown_FullMethodName, in, out, opts...) 149 if err != nil { 150 return nil, err 151 } 152 return out, nil 153 } 154 155 func (c *vMClient) CreateHandlers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHandlersResponse, error) { 156 out := new(CreateHandlersResponse) 157 err := c.cc.Invoke(ctx, VM_CreateHandlers_FullMethodName, in, out, opts...) 158 if err != nil { 159 return nil, err 160 } 161 return out, nil 162 } 163 164 func (c *vMClient) Connected(ctx context.Context, in *ConnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 165 out := new(emptypb.Empty) 166 err := c.cc.Invoke(ctx, VM_Connected_FullMethodName, in, out, opts...) 167 if err != nil { 168 return nil, err 169 } 170 return out, nil 171 } 172 173 func (c *vMClient) Disconnected(ctx context.Context, in *DisconnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 174 out := new(emptypb.Empty) 175 err := c.cc.Invoke(ctx, VM_Disconnected_FullMethodName, in, out, opts...) 176 if err != nil { 177 return nil, err 178 } 179 return out, nil 180 } 181 182 func (c *vMClient) BuildBlock(ctx context.Context, in *BuildBlockRequest, opts ...grpc.CallOption) (*BuildBlockResponse, error) { 183 out := new(BuildBlockResponse) 184 err := c.cc.Invoke(ctx, VM_BuildBlock_FullMethodName, in, out, opts...) 185 if err != nil { 186 return nil, err 187 } 188 return out, nil 189 } 190 191 func (c *vMClient) ParseBlock(ctx context.Context, in *ParseBlockRequest, opts ...grpc.CallOption) (*ParseBlockResponse, error) { 192 out := new(ParseBlockResponse) 193 err := c.cc.Invoke(ctx, VM_ParseBlock_FullMethodName, in, out, opts...) 194 if err != nil { 195 return nil, err 196 } 197 return out, nil 198 } 199 200 func (c *vMClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) { 201 out := new(GetBlockResponse) 202 err := c.cc.Invoke(ctx, VM_GetBlock_FullMethodName, in, out, opts...) 203 if err != nil { 204 return nil, err 205 } 206 return out, nil 207 } 208 209 func (c *vMClient) SetPreference(ctx context.Context, in *SetPreferenceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 210 out := new(emptypb.Empty) 211 err := c.cc.Invoke(ctx, VM_SetPreference_FullMethodName, in, out, opts...) 212 if err != nil { 213 return nil, err 214 } 215 return out, nil 216 } 217 218 func (c *vMClient) Health(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthResponse, error) { 219 out := new(HealthResponse) 220 err := c.cc.Invoke(ctx, VM_Health_FullMethodName, in, out, opts...) 221 if err != nil { 222 return nil, err 223 } 224 return out, nil 225 } 226 227 func (c *vMClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) { 228 out := new(VersionResponse) 229 err := c.cc.Invoke(ctx, VM_Version_FullMethodName, in, out, opts...) 230 if err != nil { 231 return nil, err 232 } 233 return out, nil 234 } 235 236 func (c *vMClient) AppRequest(ctx context.Context, in *AppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 237 out := new(emptypb.Empty) 238 err := c.cc.Invoke(ctx, VM_AppRequest_FullMethodName, in, out, opts...) 239 if err != nil { 240 return nil, err 241 } 242 return out, nil 243 } 244 245 func (c *vMClient) AppRequestFailed(ctx context.Context, in *AppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 246 out := new(emptypb.Empty) 247 err := c.cc.Invoke(ctx, VM_AppRequestFailed_FullMethodName, in, out, opts...) 248 if err != nil { 249 return nil, err 250 } 251 return out, nil 252 } 253 254 func (c *vMClient) AppResponse(ctx context.Context, in *AppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 255 out := new(emptypb.Empty) 256 err := c.cc.Invoke(ctx, VM_AppResponse_FullMethodName, in, out, opts...) 257 if err != nil { 258 return nil, err 259 } 260 return out, nil 261 } 262 263 func (c *vMClient) AppGossip(ctx context.Context, in *AppGossipMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 264 out := new(emptypb.Empty) 265 err := c.cc.Invoke(ctx, VM_AppGossip_FullMethodName, in, out, opts...) 266 if err != nil { 267 return nil, err 268 } 269 return out, nil 270 } 271 272 func (c *vMClient) Gather(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GatherResponse, error) { 273 out := new(GatherResponse) 274 err := c.cc.Invoke(ctx, VM_Gather_FullMethodName, in, out, opts...) 275 if err != nil { 276 return nil, err 277 } 278 return out, nil 279 } 280 281 func (c *vMClient) GetAncestors(ctx context.Context, in *GetAncestorsRequest, opts ...grpc.CallOption) (*GetAncestorsResponse, error) { 282 out := new(GetAncestorsResponse) 283 err := c.cc.Invoke(ctx, VM_GetAncestors_FullMethodName, in, out, opts...) 284 if err != nil { 285 return nil, err 286 } 287 return out, nil 288 } 289 290 func (c *vMClient) BatchedParseBlock(ctx context.Context, in *BatchedParseBlockRequest, opts ...grpc.CallOption) (*BatchedParseBlockResponse, error) { 291 out := new(BatchedParseBlockResponse) 292 err := c.cc.Invoke(ctx, VM_BatchedParseBlock_FullMethodName, in, out, opts...) 293 if err != nil { 294 return nil, err 295 } 296 return out, nil 297 } 298 299 func (c *vMClient) GetBlockIDAtHeight(ctx context.Context, in *GetBlockIDAtHeightRequest, opts ...grpc.CallOption) (*GetBlockIDAtHeightResponse, error) { 300 out := new(GetBlockIDAtHeightResponse) 301 err := c.cc.Invoke(ctx, VM_GetBlockIDAtHeight_FullMethodName, in, out, opts...) 302 if err != nil { 303 return nil, err 304 } 305 return out, nil 306 } 307 308 func (c *vMClient) StateSyncEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StateSyncEnabledResponse, error) { 309 out := new(StateSyncEnabledResponse) 310 err := c.cc.Invoke(ctx, VM_StateSyncEnabled_FullMethodName, in, out, opts...) 311 if err != nil { 312 return nil, err 313 } 314 return out, nil 315 } 316 317 func (c *vMClient) GetOngoingSyncStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetOngoingSyncStateSummaryResponse, error) { 318 out := new(GetOngoingSyncStateSummaryResponse) 319 err := c.cc.Invoke(ctx, VM_GetOngoingSyncStateSummary_FullMethodName, in, out, opts...) 320 if err != nil { 321 return nil, err 322 } 323 return out, nil 324 } 325 326 func (c *vMClient) GetLastStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLastStateSummaryResponse, error) { 327 out := new(GetLastStateSummaryResponse) 328 err := c.cc.Invoke(ctx, VM_GetLastStateSummary_FullMethodName, in, out, opts...) 329 if err != nil { 330 return nil, err 331 } 332 return out, nil 333 } 334 335 func (c *vMClient) ParseStateSummary(ctx context.Context, in *ParseStateSummaryRequest, opts ...grpc.CallOption) (*ParseStateSummaryResponse, error) { 336 out := new(ParseStateSummaryResponse) 337 err := c.cc.Invoke(ctx, VM_ParseStateSummary_FullMethodName, in, out, opts...) 338 if err != nil { 339 return nil, err 340 } 341 return out, nil 342 } 343 344 func (c *vMClient) GetStateSummary(ctx context.Context, in *GetStateSummaryRequest, opts ...grpc.CallOption) (*GetStateSummaryResponse, error) { 345 out := new(GetStateSummaryResponse) 346 err := c.cc.Invoke(ctx, VM_GetStateSummary_FullMethodName, in, out, opts...) 347 if err != nil { 348 return nil, err 349 } 350 return out, nil 351 } 352 353 func (c *vMClient) BlockVerify(ctx context.Context, in *BlockVerifyRequest, opts ...grpc.CallOption) (*BlockVerifyResponse, error) { 354 out := new(BlockVerifyResponse) 355 err := c.cc.Invoke(ctx, VM_BlockVerify_FullMethodName, in, out, opts...) 356 if err != nil { 357 return nil, err 358 } 359 return out, nil 360 } 361 362 func (c *vMClient) BlockAccept(ctx context.Context, in *BlockAcceptRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 363 out := new(emptypb.Empty) 364 err := c.cc.Invoke(ctx, VM_BlockAccept_FullMethodName, in, out, opts...) 365 if err != nil { 366 return nil, err 367 } 368 return out, nil 369 } 370 371 func (c *vMClient) BlockReject(ctx context.Context, in *BlockRejectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 372 out := new(emptypb.Empty) 373 err := c.cc.Invoke(ctx, VM_BlockReject_FullMethodName, in, out, opts...) 374 if err != nil { 375 return nil, err 376 } 377 return out, nil 378 } 379 380 func (c *vMClient) StateSummaryAccept(ctx context.Context, in *StateSummaryAcceptRequest, opts ...grpc.CallOption) (*StateSummaryAcceptResponse, error) { 381 out := new(StateSummaryAcceptResponse) 382 err := c.cc.Invoke(ctx, VM_StateSummaryAccept_FullMethodName, in, out, opts...) 383 if err != nil { 384 return nil, err 385 } 386 return out, nil 387 } 388 389 // VMServer is the server API for VM service. 390 // All implementations must embed UnimplementedVMServer 391 // for forward compatibility 392 type VMServer interface { 393 // ChainVM 394 // 395 // Initialize this VM. 396 Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error) 397 // SetState communicates to VM its next state it starts 398 SetState(context.Context, *SetStateRequest) (*SetStateResponse, error) 399 // Shutdown is called when the node is shutting down. 400 Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error) 401 // Creates the HTTP handlers for custom chain network calls. 402 CreateHandlers(context.Context, *emptypb.Empty) (*CreateHandlersResponse, error) 403 Connected(context.Context, *ConnectedRequest) (*emptypb.Empty, error) 404 Disconnected(context.Context, *DisconnectedRequest) (*emptypb.Empty, error) 405 // Attempt to create a new block from data contained in the VM. 406 BuildBlock(context.Context, *BuildBlockRequest) (*BuildBlockResponse, error) 407 // Attempt to create a block from a stream of bytes. 408 ParseBlock(context.Context, *ParseBlockRequest) (*ParseBlockResponse, error) 409 // Attempt to load a block. 410 GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) 411 // Notify the VM of the currently preferred block. 412 SetPreference(context.Context, *SetPreferenceRequest) (*emptypb.Empty, error) 413 // Attempt to verify the health of the VM. 414 Health(context.Context, *emptypb.Empty) (*HealthResponse, error) 415 // Version returns the version of the VM. 416 Version(context.Context, *emptypb.Empty) (*VersionResponse, error) 417 // Notify this engine of a request for data from [nodeID]. 418 AppRequest(context.Context, *AppRequestMsg) (*emptypb.Empty, error) 419 // Notify this engine that an AppRequest message it sent to [nodeID] with 420 // request ID [requestID] failed. 421 AppRequestFailed(context.Context, *AppRequestFailedMsg) (*emptypb.Empty, error) 422 // Notify this engine of a response to the AppRequest message it sent to 423 // [nodeID] with request ID [requestID]. 424 AppResponse(context.Context, *AppResponseMsg) (*emptypb.Empty, error) 425 // Notify this engine of a gossip message from [nodeID]. 426 AppGossip(context.Context, *AppGossipMsg) (*emptypb.Empty, error) 427 // Attempts to gather metrics from a VM. 428 Gather(context.Context, *emptypb.Empty) (*GatherResponse, error) 429 // BatchedChainVM 430 GetAncestors(context.Context, *GetAncestorsRequest) (*GetAncestorsResponse, error) 431 BatchedParseBlock(context.Context, *BatchedParseBlockRequest) (*BatchedParseBlockResponse, error) 432 // HeightIndexedChainVM 433 GetBlockIDAtHeight(context.Context, *GetBlockIDAtHeightRequest) (*GetBlockIDAtHeightResponse, error) 434 // StateSyncableVM 435 // 436 // StateSyncEnabled indicates whether the state sync is enabled for this VM. 437 StateSyncEnabled(context.Context, *emptypb.Empty) (*StateSyncEnabledResponse, error) 438 // GetOngoingSyncStateSummary returns an in-progress state summary if it exists. 439 GetOngoingSyncStateSummary(context.Context, *emptypb.Empty) (*GetOngoingSyncStateSummaryResponse, error) 440 // GetLastStateSummary returns the latest state summary. 441 GetLastStateSummary(context.Context, *emptypb.Empty) (*GetLastStateSummaryResponse, error) 442 // ParseStateSummary parses a state summary out of [summaryBytes]. 443 ParseStateSummary(context.Context, *ParseStateSummaryRequest) (*ParseStateSummaryResponse, error) 444 // GetStateSummary retrieves the state summary that was generated at height 445 // [summaryHeight]. 446 GetStateSummary(context.Context, *GetStateSummaryRequest) (*GetStateSummaryResponse, error) 447 // Block 448 BlockVerify(context.Context, *BlockVerifyRequest) (*BlockVerifyResponse, error) 449 BlockAccept(context.Context, *BlockAcceptRequest) (*emptypb.Empty, error) 450 BlockReject(context.Context, *BlockRejectRequest) (*emptypb.Empty, error) 451 // StateSummary 452 StateSummaryAccept(context.Context, *StateSummaryAcceptRequest) (*StateSummaryAcceptResponse, error) 453 mustEmbedUnimplementedVMServer() 454 } 455 456 // UnimplementedVMServer must be embedded to have forward compatible implementations. 457 type UnimplementedVMServer struct { 458 } 459 460 func (UnimplementedVMServer) Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error) { 461 return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented") 462 } 463 func (UnimplementedVMServer) SetState(context.Context, *SetStateRequest) (*SetStateResponse, error) { 464 return nil, status.Errorf(codes.Unimplemented, "method SetState not implemented") 465 } 466 func (UnimplementedVMServer) Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { 467 return nil, status.Errorf(codes.Unimplemented, "method Shutdown not implemented") 468 } 469 func (UnimplementedVMServer) CreateHandlers(context.Context, *emptypb.Empty) (*CreateHandlersResponse, error) { 470 return nil, status.Errorf(codes.Unimplemented, "method CreateHandlers not implemented") 471 } 472 func (UnimplementedVMServer) Connected(context.Context, *ConnectedRequest) (*emptypb.Empty, error) { 473 return nil, status.Errorf(codes.Unimplemented, "method Connected not implemented") 474 } 475 func (UnimplementedVMServer) Disconnected(context.Context, *DisconnectedRequest) (*emptypb.Empty, error) { 476 return nil, status.Errorf(codes.Unimplemented, "method Disconnected not implemented") 477 } 478 func (UnimplementedVMServer) BuildBlock(context.Context, *BuildBlockRequest) (*BuildBlockResponse, error) { 479 return nil, status.Errorf(codes.Unimplemented, "method BuildBlock not implemented") 480 } 481 func (UnimplementedVMServer) ParseBlock(context.Context, *ParseBlockRequest) (*ParseBlockResponse, error) { 482 return nil, status.Errorf(codes.Unimplemented, "method ParseBlock not implemented") 483 } 484 func (UnimplementedVMServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) { 485 return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") 486 } 487 func (UnimplementedVMServer) SetPreference(context.Context, *SetPreferenceRequest) (*emptypb.Empty, error) { 488 return nil, status.Errorf(codes.Unimplemented, "method SetPreference not implemented") 489 } 490 func (UnimplementedVMServer) Health(context.Context, *emptypb.Empty) (*HealthResponse, error) { 491 return nil, status.Errorf(codes.Unimplemented, "method Health not implemented") 492 } 493 func (UnimplementedVMServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error) { 494 return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") 495 } 496 func (UnimplementedVMServer) AppRequest(context.Context, *AppRequestMsg) (*emptypb.Empty, error) { 497 return nil, status.Errorf(codes.Unimplemented, "method AppRequest not implemented") 498 } 499 func (UnimplementedVMServer) AppRequestFailed(context.Context, *AppRequestFailedMsg) (*emptypb.Empty, error) { 500 return nil, status.Errorf(codes.Unimplemented, "method AppRequestFailed not implemented") 501 } 502 func (UnimplementedVMServer) AppResponse(context.Context, *AppResponseMsg) (*emptypb.Empty, error) { 503 return nil, status.Errorf(codes.Unimplemented, "method AppResponse not implemented") 504 } 505 func (UnimplementedVMServer) AppGossip(context.Context, *AppGossipMsg) (*emptypb.Empty, error) { 506 return nil, status.Errorf(codes.Unimplemented, "method AppGossip not implemented") 507 } 508 func (UnimplementedVMServer) Gather(context.Context, *emptypb.Empty) (*GatherResponse, error) { 509 return nil, status.Errorf(codes.Unimplemented, "method Gather not implemented") 510 } 511 func (UnimplementedVMServer) GetAncestors(context.Context, *GetAncestorsRequest) (*GetAncestorsResponse, error) { 512 return nil, status.Errorf(codes.Unimplemented, "method GetAncestors not implemented") 513 } 514 func (UnimplementedVMServer) BatchedParseBlock(context.Context, *BatchedParseBlockRequest) (*BatchedParseBlockResponse, error) { 515 return nil, status.Errorf(codes.Unimplemented, "method BatchedParseBlock not implemented") 516 } 517 func (UnimplementedVMServer) GetBlockIDAtHeight(context.Context, *GetBlockIDAtHeightRequest) (*GetBlockIDAtHeightResponse, error) { 518 return nil, status.Errorf(codes.Unimplemented, "method GetBlockIDAtHeight not implemented") 519 } 520 func (UnimplementedVMServer) StateSyncEnabled(context.Context, *emptypb.Empty) (*StateSyncEnabledResponse, error) { 521 return nil, status.Errorf(codes.Unimplemented, "method StateSyncEnabled not implemented") 522 } 523 func (UnimplementedVMServer) GetOngoingSyncStateSummary(context.Context, *emptypb.Empty) (*GetOngoingSyncStateSummaryResponse, error) { 524 return nil, status.Errorf(codes.Unimplemented, "method GetOngoingSyncStateSummary not implemented") 525 } 526 func (UnimplementedVMServer) GetLastStateSummary(context.Context, *emptypb.Empty) (*GetLastStateSummaryResponse, error) { 527 return nil, status.Errorf(codes.Unimplemented, "method GetLastStateSummary not implemented") 528 } 529 func (UnimplementedVMServer) ParseStateSummary(context.Context, *ParseStateSummaryRequest) (*ParseStateSummaryResponse, error) { 530 return nil, status.Errorf(codes.Unimplemented, "method ParseStateSummary not implemented") 531 } 532 func (UnimplementedVMServer) GetStateSummary(context.Context, *GetStateSummaryRequest) (*GetStateSummaryResponse, error) { 533 return nil, status.Errorf(codes.Unimplemented, "method GetStateSummary not implemented") 534 } 535 func (UnimplementedVMServer) BlockVerify(context.Context, *BlockVerifyRequest) (*BlockVerifyResponse, error) { 536 return nil, status.Errorf(codes.Unimplemented, "method BlockVerify not implemented") 537 } 538 func (UnimplementedVMServer) BlockAccept(context.Context, *BlockAcceptRequest) (*emptypb.Empty, error) { 539 return nil, status.Errorf(codes.Unimplemented, "method BlockAccept not implemented") 540 } 541 func (UnimplementedVMServer) BlockReject(context.Context, *BlockRejectRequest) (*emptypb.Empty, error) { 542 return nil, status.Errorf(codes.Unimplemented, "method BlockReject not implemented") 543 } 544 func (UnimplementedVMServer) StateSummaryAccept(context.Context, *StateSummaryAcceptRequest) (*StateSummaryAcceptResponse, error) { 545 return nil, status.Errorf(codes.Unimplemented, "method StateSummaryAccept not implemented") 546 } 547 func (UnimplementedVMServer) mustEmbedUnimplementedVMServer() {} 548 549 // UnsafeVMServer may be embedded to opt out of forward compatibility for this service. 550 // Use of this interface is not recommended, as added methods to VMServer will 551 // result in compilation errors. 552 type UnsafeVMServer interface { 553 mustEmbedUnimplementedVMServer() 554 } 555 556 func RegisterVMServer(s grpc.ServiceRegistrar, srv VMServer) { 557 s.RegisterService(&VM_ServiceDesc, srv) 558 } 559 560 func _VM_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 561 in := new(InitializeRequest) 562 if err := dec(in); err != nil { 563 return nil, err 564 } 565 if interceptor == nil { 566 return srv.(VMServer).Initialize(ctx, in) 567 } 568 info := &grpc.UnaryServerInfo{ 569 Server: srv, 570 FullMethod: VM_Initialize_FullMethodName, 571 } 572 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 573 return srv.(VMServer).Initialize(ctx, req.(*InitializeRequest)) 574 } 575 return interceptor(ctx, in, info, handler) 576 } 577 578 func _VM_SetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 579 in := new(SetStateRequest) 580 if err := dec(in); err != nil { 581 return nil, err 582 } 583 if interceptor == nil { 584 return srv.(VMServer).SetState(ctx, in) 585 } 586 info := &grpc.UnaryServerInfo{ 587 Server: srv, 588 FullMethod: VM_SetState_FullMethodName, 589 } 590 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 591 return srv.(VMServer).SetState(ctx, req.(*SetStateRequest)) 592 } 593 return interceptor(ctx, in, info, handler) 594 } 595 596 func _VM_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 597 in := new(emptypb.Empty) 598 if err := dec(in); err != nil { 599 return nil, err 600 } 601 if interceptor == nil { 602 return srv.(VMServer).Shutdown(ctx, in) 603 } 604 info := &grpc.UnaryServerInfo{ 605 Server: srv, 606 FullMethod: VM_Shutdown_FullMethodName, 607 } 608 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 609 return srv.(VMServer).Shutdown(ctx, req.(*emptypb.Empty)) 610 } 611 return interceptor(ctx, in, info, handler) 612 } 613 614 func _VM_CreateHandlers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 615 in := new(emptypb.Empty) 616 if err := dec(in); err != nil { 617 return nil, err 618 } 619 if interceptor == nil { 620 return srv.(VMServer).CreateHandlers(ctx, in) 621 } 622 info := &grpc.UnaryServerInfo{ 623 Server: srv, 624 FullMethod: VM_CreateHandlers_FullMethodName, 625 } 626 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 627 return srv.(VMServer).CreateHandlers(ctx, req.(*emptypb.Empty)) 628 } 629 return interceptor(ctx, in, info, handler) 630 } 631 632 func _VM_Connected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 633 in := new(ConnectedRequest) 634 if err := dec(in); err != nil { 635 return nil, err 636 } 637 if interceptor == nil { 638 return srv.(VMServer).Connected(ctx, in) 639 } 640 info := &grpc.UnaryServerInfo{ 641 Server: srv, 642 FullMethod: VM_Connected_FullMethodName, 643 } 644 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 645 return srv.(VMServer).Connected(ctx, req.(*ConnectedRequest)) 646 } 647 return interceptor(ctx, in, info, handler) 648 } 649 650 func _VM_Disconnected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 651 in := new(DisconnectedRequest) 652 if err := dec(in); err != nil { 653 return nil, err 654 } 655 if interceptor == nil { 656 return srv.(VMServer).Disconnected(ctx, in) 657 } 658 info := &grpc.UnaryServerInfo{ 659 Server: srv, 660 FullMethod: VM_Disconnected_FullMethodName, 661 } 662 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 663 return srv.(VMServer).Disconnected(ctx, req.(*DisconnectedRequest)) 664 } 665 return interceptor(ctx, in, info, handler) 666 } 667 668 func _VM_BuildBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 669 in := new(BuildBlockRequest) 670 if err := dec(in); err != nil { 671 return nil, err 672 } 673 if interceptor == nil { 674 return srv.(VMServer).BuildBlock(ctx, in) 675 } 676 info := &grpc.UnaryServerInfo{ 677 Server: srv, 678 FullMethod: VM_BuildBlock_FullMethodName, 679 } 680 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 681 return srv.(VMServer).BuildBlock(ctx, req.(*BuildBlockRequest)) 682 } 683 return interceptor(ctx, in, info, handler) 684 } 685 686 func _VM_ParseBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 687 in := new(ParseBlockRequest) 688 if err := dec(in); err != nil { 689 return nil, err 690 } 691 if interceptor == nil { 692 return srv.(VMServer).ParseBlock(ctx, in) 693 } 694 info := &grpc.UnaryServerInfo{ 695 Server: srv, 696 FullMethod: VM_ParseBlock_FullMethodName, 697 } 698 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 699 return srv.(VMServer).ParseBlock(ctx, req.(*ParseBlockRequest)) 700 } 701 return interceptor(ctx, in, info, handler) 702 } 703 704 func _VM_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 705 in := new(GetBlockRequest) 706 if err := dec(in); err != nil { 707 return nil, err 708 } 709 if interceptor == nil { 710 return srv.(VMServer).GetBlock(ctx, in) 711 } 712 info := &grpc.UnaryServerInfo{ 713 Server: srv, 714 FullMethod: VM_GetBlock_FullMethodName, 715 } 716 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 717 return srv.(VMServer).GetBlock(ctx, req.(*GetBlockRequest)) 718 } 719 return interceptor(ctx, in, info, handler) 720 } 721 722 func _VM_SetPreference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 723 in := new(SetPreferenceRequest) 724 if err := dec(in); err != nil { 725 return nil, err 726 } 727 if interceptor == nil { 728 return srv.(VMServer).SetPreference(ctx, in) 729 } 730 info := &grpc.UnaryServerInfo{ 731 Server: srv, 732 FullMethod: VM_SetPreference_FullMethodName, 733 } 734 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 735 return srv.(VMServer).SetPreference(ctx, req.(*SetPreferenceRequest)) 736 } 737 return interceptor(ctx, in, info, handler) 738 } 739 740 func _VM_Health_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 741 in := new(emptypb.Empty) 742 if err := dec(in); err != nil { 743 return nil, err 744 } 745 if interceptor == nil { 746 return srv.(VMServer).Health(ctx, in) 747 } 748 info := &grpc.UnaryServerInfo{ 749 Server: srv, 750 FullMethod: VM_Health_FullMethodName, 751 } 752 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 753 return srv.(VMServer).Health(ctx, req.(*emptypb.Empty)) 754 } 755 return interceptor(ctx, in, info, handler) 756 } 757 758 func _VM_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 759 in := new(emptypb.Empty) 760 if err := dec(in); err != nil { 761 return nil, err 762 } 763 if interceptor == nil { 764 return srv.(VMServer).Version(ctx, in) 765 } 766 info := &grpc.UnaryServerInfo{ 767 Server: srv, 768 FullMethod: VM_Version_FullMethodName, 769 } 770 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 771 return srv.(VMServer).Version(ctx, req.(*emptypb.Empty)) 772 } 773 return interceptor(ctx, in, info, handler) 774 } 775 776 func _VM_AppRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 777 in := new(AppRequestMsg) 778 if err := dec(in); err != nil { 779 return nil, err 780 } 781 if interceptor == nil { 782 return srv.(VMServer).AppRequest(ctx, in) 783 } 784 info := &grpc.UnaryServerInfo{ 785 Server: srv, 786 FullMethod: VM_AppRequest_FullMethodName, 787 } 788 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 789 return srv.(VMServer).AppRequest(ctx, req.(*AppRequestMsg)) 790 } 791 return interceptor(ctx, in, info, handler) 792 } 793 794 func _VM_AppRequestFailed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 795 in := new(AppRequestFailedMsg) 796 if err := dec(in); err != nil { 797 return nil, err 798 } 799 if interceptor == nil { 800 return srv.(VMServer).AppRequestFailed(ctx, in) 801 } 802 info := &grpc.UnaryServerInfo{ 803 Server: srv, 804 FullMethod: VM_AppRequestFailed_FullMethodName, 805 } 806 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 807 return srv.(VMServer).AppRequestFailed(ctx, req.(*AppRequestFailedMsg)) 808 } 809 return interceptor(ctx, in, info, handler) 810 } 811 812 func _VM_AppResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 813 in := new(AppResponseMsg) 814 if err := dec(in); err != nil { 815 return nil, err 816 } 817 if interceptor == nil { 818 return srv.(VMServer).AppResponse(ctx, in) 819 } 820 info := &grpc.UnaryServerInfo{ 821 Server: srv, 822 FullMethod: VM_AppResponse_FullMethodName, 823 } 824 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 825 return srv.(VMServer).AppResponse(ctx, req.(*AppResponseMsg)) 826 } 827 return interceptor(ctx, in, info, handler) 828 } 829 830 func _VM_AppGossip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 831 in := new(AppGossipMsg) 832 if err := dec(in); err != nil { 833 return nil, err 834 } 835 if interceptor == nil { 836 return srv.(VMServer).AppGossip(ctx, in) 837 } 838 info := &grpc.UnaryServerInfo{ 839 Server: srv, 840 FullMethod: VM_AppGossip_FullMethodName, 841 } 842 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 843 return srv.(VMServer).AppGossip(ctx, req.(*AppGossipMsg)) 844 } 845 return interceptor(ctx, in, info, handler) 846 } 847 848 func _VM_Gather_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 849 in := new(emptypb.Empty) 850 if err := dec(in); err != nil { 851 return nil, err 852 } 853 if interceptor == nil { 854 return srv.(VMServer).Gather(ctx, in) 855 } 856 info := &grpc.UnaryServerInfo{ 857 Server: srv, 858 FullMethod: VM_Gather_FullMethodName, 859 } 860 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 861 return srv.(VMServer).Gather(ctx, req.(*emptypb.Empty)) 862 } 863 return interceptor(ctx, in, info, handler) 864 } 865 866 func _VM_GetAncestors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 867 in := new(GetAncestorsRequest) 868 if err := dec(in); err != nil { 869 return nil, err 870 } 871 if interceptor == nil { 872 return srv.(VMServer).GetAncestors(ctx, in) 873 } 874 info := &grpc.UnaryServerInfo{ 875 Server: srv, 876 FullMethod: VM_GetAncestors_FullMethodName, 877 } 878 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 879 return srv.(VMServer).GetAncestors(ctx, req.(*GetAncestorsRequest)) 880 } 881 return interceptor(ctx, in, info, handler) 882 } 883 884 func _VM_BatchedParseBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 885 in := new(BatchedParseBlockRequest) 886 if err := dec(in); err != nil { 887 return nil, err 888 } 889 if interceptor == nil { 890 return srv.(VMServer).BatchedParseBlock(ctx, in) 891 } 892 info := &grpc.UnaryServerInfo{ 893 Server: srv, 894 FullMethod: VM_BatchedParseBlock_FullMethodName, 895 } 896 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 897 return srv.(VMServer).BatchedParseBlock(ctx, req.(*BatchedParseBlockRequest)) 898 } 899 return interceptor(ctx, in, info, handler) 900 } 901 902 func _VM_GetBlockIDAtHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 903 in := new(GetBlockIDAtHeightRequest) 904 if err := dec(in); err != nil { 905 return nil, err 906 } 907 if interceptor == nil { 908 return srv.(VMServer).GetBlockIDAtHeight(ctx, in) 909 } 910 info := &grpc.UnaryServerInfo{ 911 Server: srv, 912 FullMethod: VM_GetBlockIDAtHeight_FullMethodName, 913 } 914 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 915 return srv.(VMServer).GetBlockIDAtHeight(ctx, req.(*GetBlockIDAtHeightRequest)) 916 } 917 return interceptor(ctx, in, info, handler) 918 } 919 920 func _VM_StateSyncEnabled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 921 in := new(emptypb.Empty) 922 if err := dec(in); err != nil { 923 return nil, err 924 } 925 if interceptor == nil { 926 return srv.(VMServer).StateSyncEnabled(ctx, in) 927 } 928 info := &grpc.UnaryServerInfo{ 929 Server: srv, 930 FullMethod: VM_StateSyncEnabled_FullMethodName, 931 } 932 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 933 return srv.(VMServer).StateSyncEnabled(ctx, req.(*emptypb.Empty)) 934 } 935 return interceptor(ctx, in, info, handler) 936 } 937 938 func _VM_GetOngoingSyncStateSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 939 in := new(emptypb.Empty) 940 if err := dec(in); err != nil { 941 return nil, err 942 } 943 if interceptor == nil { 944 return srv.(VMServer).GetOngoingSyncStateSummary(ctx, in) 945 } 946 info := &grpc.UnaryServerInfo{ 947 Server: srv, 948 FullMethod: VM_GetOngoingSyncStateSummary_FullMethodName, 949 } 950 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 951 return srv.(VMServer).GetOngoingSyncStateSummary(ctx, req.(*emptypb.Empty)) 952 } 953 return interceptor(ctx, in, info, handler) 954 } 955 956 func _VM_GetLastStateSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 957 in := new(emptypb.Empty) 958 if err := dec(in); err != nil { 959 return nil, err 960 } 961 if interceptor == nil { 962 return srv.(VMServer).GetLastStateSummary(ctx, in) 963 } 964 info := &grpc.UnaryServerInfo{ 965 Server: srv, 966 FullMethod: VM_GetLastStateSummary_FullMethodName, 967 } 968 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 969 return srv.(VMServer).GetLastStateSummary(ctx, req.(*emptypb.Empty)) 970 } 971 return interceptor(ctx, in, info, handler) 972 } 973 974 func _VM_ParseStateSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 975 in := new(ParseStateSummaryRequest) 976 if err := dec(in); err != nil { 977 return nil, err 978 } 979 if interceptor == nil { 980 return srv.(VMServer).ParseStateSummary(ctx, in) 981 } 982 info := &grpc.UnaryServerInfo{ 983 Server: srv, 984 FullMethod: VM_ParseStateSummary_FullMethodName, 985 } 986 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 987 return srv.(VMServer).ParseStateSummary(ctx, req.(*ParseStateSummaryRequest)) 988 } 989 return interceptor(ctx, in, info, handler) 990 } 991 992 func _VM_GetStateSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 993 in := new(GetStateSummaryRequest) 994 if err := dec(in); err != nil { 995 return nil, err 996 } 997 if interceptor == nil { 998 return srv.(VMServer).GetStateSummary(ctx, in) 999 } 1000 info := &grpc.UnaryServerInfo{ 1001 Server: srv, 1002 FullMethod: VM_GetStateSummary_FullMethodName, 1003 } 1004 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1005 return srv.(VMServer).GetStateSummary(ctx, req.(*GetStateSummaryRequest)) 1006 } 1007 return interceptor(ctx, in, info, handler) 1008 } 1009 1010 func _VM_BlockVerify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1011 in := new(BlockVerifyRequest) 1012 if err := dec(in); err != nil { 1013 return nil, err 1014 } 1015 if interceptor == nil { 1016 return srv.(VMServer).BlockVerify(ctx, in) 1017 } 1018 info := &grpc.UnaryServerInfo{ 1019 Server: srv, 1020 FullMethod: VM_BlockVerify_FullMethodName, 1021 } 1022 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1023 return srv.(VMServer).BlockVerify(ctx, req.(*BlockVerifyRequest)) 1024 } 1025 return interceptor(ctx, in, info, handler) 1026 } 1027 1028 func _VM_BlockAccept_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1029 in := new(BlockAcceptRequest) 1030 if err := dec(in); err != nil { 1031 return nil, err 1032 } 1033 if interceptor == nil { 1034 return srv.(VMServer).BlockAccept(ctx, in) 1035 } 1036 info := &grpc.UnaryServerInfo{ 1037 Server: srv, 1038 FullMethod: VM_BlockAccept_FullMethodName, 1039 } 1040 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1041 return srv.(VMServer).BlockAccept(ctx, req.(*BlockAcceptRequest)) 1042 } 1043 return interceptor(ctx, in, info, handler) 1044 } 1045 1046 func _VM_BlockReject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1047 in := new(BlockRejectRequest) 1048 if err := dec(in); err != nil { 1049 return nil, err 1050 } 1051 if interceptor == nil { 1052 return srv.(VMServer).BlockReject(ctx, in) 1053 } 1054 info := &grpc.UnaryServerInfo{ 1055 Server: srv, 1056 FullMethod: VM_BlockReject_FullMethodName, 1057 } 1058 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1059 return srv.(VMServer).BlockReject(ctx, req.(*BlockRejectRequest)) 1060 } 1061 return interceptor(ctx, in, info, handler) 1062 } 1063 1064 func _VM_StateSummaryAccept_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1065 in := new(StateSummaryAcceptRequest) 1066 if err := dec(in); err != nil { 1067 return nil, err 1068 } 1069 if interceptor == nil { 1070 return srv.(VMServer).StateSummaryAccept(ctx, in) 1071 } 1072 info := &grpc.UnaryServerInfo{ 1073 Server: srv, 1074 FullMethod: VM_StateSummaryAccept_FullMethodName, 1075 } 1076 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1077 return srv.(VMServer).StateSummaryAccept(ctx, req.(*StateSummaryAcceptRequest)) 1078 } 1079 return interceptor(ctx, in, info, handler) 1080 } 1081 1082 // VM_ServiceDesc is the grpc.ServiceDesc for VM service. 1083 // It's only intended for direct use with grpc.RegisterService, 1084 // and not to be introspected or modified (even as a copy) 1085 var VM_ServiceDesc = grpc.ServiceDesc{ 1086 ServiceName: "vm.VM", 1087 HandlerType: (*VMServer)(nil), 1088 Methods: []grpc.MethodDesc{ 1089 { 1090 MethodName: "Initialize", 1091 Handler: _VM_Initialize_Handler, 1092 }, 1093 { 1094 MethodName: "SetState", 1095 Handler: _VM_SetState_Handler, 1096 }, 1097 { 1098 MethodName: "Shutdown", 1099 Handler: _VM_Shutdown_Handler, 1100 }, 1101 { 1102 MethodName: "CreateHandlers", 1103 Handler: _VM_CreateHandlers_Handler, 1104 }, 1105 { 1106 MethodName: "Connected", 1107 Handler: _VM_Connected_Handler, 1108 }, 1109 { 1110 MethodName: "Disconnected", 1111 Handler: _VM_Disconnected_Handler, 1112 }, 1113 { 1114 MethodName: "BuildBlock", 1115 Handler: _VM_BuildBlock_Handler, 1116 }, 1117 { 1118 MethodName: "ParseBlock", 1119 Handler: _VM_ParseBlock_Handler, 1120 }, 1121 { 1122 MethodName: "GetBlock", 1123 Handler: _VM_GetBlock_Handler, 1124 }, 1125 { 1126 MethodName: "SetPreference", 1127 Handler: _VM_SetPreference_Handler, 1128 }, 1129 { 1130 MethodName: "Health", 1131 Handler: _VM_Health_Handler, 1132 }, 1133 { 1134 MethodName: "Version", 1135 Handler: _VM_Version_Handler, 1136 }, 1137 { 1138 MethodName: "AppRequest", 1139 Handler: _VM_AppRequest_Handler, 1140 }, 1141 { 1142 MethodName: "AppRequestFailed", 1143 Handler: _VM_AppRequestFailed_Handler, 1144 }, 1145 { 1146 MethodName: "AppResponse", 1147 Handler: _VM_AppResponse_Handler, 1148 }, 1149 { 1150 MethodName: "AppGossip", 1151 Handler: _VM_AppGossip_Handler, 1152 }, 1153 { 1154 MethodName: "Gather", 1155 Handler: _VM_Gather_Handler, 1156 }, 1157 { 1158 MethodName: "GetAncestors", 1159 Handler: _VM_GetAncestors_Handler, 1160 }, 1161 { 1162 MethodName: "BatchedParseBlock", 1163 Handler: _VM_BatchedParseBlock_Handler, 1164 }, 1165 { 1166 MethodName: "GetBlockIDAtHeight", 1167 Handler: _VM_GetBlockIDAtHeight_Handler, 1168 }, 1169 { 1170 MethodName: "StateSyncEnabled", 1171 Handler: _VM_StateSyncEnabled_Handler, 1172 }, 1173 { 1174 MethodName: "GetOngoingSyncStateSummary", 1175 Handler: _VM_GetOngoingSyncStateSummary_Handler, 1176 }, 1177 { 1178 MethodName: "GetLastStateSummary", 1179 Handler: _VM_GetLastStateSummary_Handler, 1180 }, 1181 { 1182 MethodName: "ParseStateSummary", 1183 Handler: _VM_ParseStateSummary_Handler, 1184 }, 1185 { 1186 MethodName: "GetStateSummary", 1187 Handler: _VM_GetStateSummary_Handler, 1188 }, 1189 { 1190 MethodName: "BlockVerify", 1191 Handler: _VM_BlockVerify_Handler, 1192 }, 1193 { 1194 MethodName: "BlockAccept", 1195 Handler: _VM_BlockAccept_Handler, 1196 }, 1197 { 1198 MethodName: "BlockReject", 1199 Handler: _VM_BlockReject_Handler, 1200 }, 1201 { 1202 MethodName: "StateSummaryAccept", 1203 Handler: _VM_StateSummaryAccept_Handler, 1204 }, 1205 }, 1206 Streams: []grpc.StreamDesc{}, 1207 Metadata: "vm/vm.proto", 1208 }