From cc9e62fe4f6310f48182a5311d8347dcbf07dd0c Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 23 Apr 2024 12:51:48 +0200 Subject: [PATCH] Replace block metadata topics with `ListenToBlockMetadata` --- go/inx.pb.go | 242 ++++++++++++++++++++++------------------------ go/inx_grpc.pb.go | 108 +++++---------------- go/utils.go | 12 +-- proto/inx.proto | 3 +- 4 files changed, 147 insertions(+), 218 deletions(-) diff --git a/go/inx.pb.go b/go/inx.pb.go index bc6e73b..2db4cf6 100644 --- a/go/inx.pb.go +++ b/go/inx.pb.go @@ -3572,7 +3572,7 @@ var file_inx_proto_rawDesc = []byte{ 0x64, 0x79, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xf2, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xb1, 0x0c, 0x0a, 0x03, 0x49, 0x4e, 0x58, 0x12, 0x30, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x0f, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, @@ -3602,83 +3602,79 @@ var file_inx_proto_rawDesc = []byte{ 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x0a, 0x2e, 0x69, 0x6e, - 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x30, 0x01, 0x12, 0x3d, 0x0a, 0x16, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x2a, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, - 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x1a, - 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x35, - 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, - 0x64, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x41, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x10, 0x2e, 0x69, 0x6e, - 0x78, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x47, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x1a, 0x18, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x4a, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x73, 0x73, - 0x75, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x49, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x73, 0x73, 0x75, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0f, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x0f, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x39, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x55, 0x6e, 0x73, 0x70, - 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x15, 0x52, - 0x65, 0x61, 0x64, 0x49, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, - 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3d, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x49, 0x73, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x15, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x2a, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, 0x77, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x1a, 0x0d, + 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x35, 0x0a, + 0x11, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, + 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x10, 0x2e, 0x69, 0x6e, 0x78, + 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x69, + 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x47, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x1a, 0x18, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x4a, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x73, 0x73, 0x75, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x49, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x73, 0x73, 0x75, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x0f, + 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, + 0x1e, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x55, 0x6e, 0x73, 0x70, 0x65, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x15, 0x52, 0x65, + 0x61, 0x64, 0x49, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x44, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x64, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x54, - 0x6f, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x15, - 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4c, 0x65, 0x64, 0x67, - 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, 0x12, 0x49, 0x0a, 0x1c, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, - 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x18, 0x2e, 0x69, 0x6e, 0x78, 0x2e, - 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x30, 0x01, 0x12, 0x30, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x49, 0x64, 0x1a, 0x13, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x41, 0x50, 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x69, 0x6e, - 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x39, 0x0a, 0x12, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x50, - 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x69, - 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x11, 0x50, - 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x41, 0x50, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0f, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x10, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x69, 0x6f, 0x74, 0x61, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x78, - 0x2f, 0x67, 0x6f, 0x3b, 0x69, 0x6e, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x3d, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x49, 0x73, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, + 0x78, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, + 0x0a, 0x16, 0x52, 0x65, 0x61, 0x64, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x54, 0x6f, + 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x15, 0x2e, + 0x69, 0x6e, 0x78, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, 0x12, 0x49, 0x0a, 0x1c, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, + 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x18, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x30, 0x01, 0x12, 0x30, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, + 0x64, 0x1a, 0x13, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x41, 0x50, 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x69, 0x6e, 0x78, + 0x2e, 0x41, 0x50, 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x39, 0x0a, 0x12, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x50, 0x49, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x69, 0x6e, + 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x11, 0x50, 0x65, + 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x41, 0x50, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0f, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x10, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x69, 0x6f, 0x74, 0x61, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x78, 0x2f, + 0x67, 0x6f, 0x3b, 0x69, 0x6e, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3801,54 +3797,52 @@ var file_inx_proto_depIdxs = []int32{ 12, // 53: inx.INX.ReadCommitment:input_type -> inx.CommitmentRequest 13, // 54: inx.INX.ForceCommitUntil:input_type -> inx.SlotRequest 4, // 55: inx.INX.ListenToBlocks:input_type -> inx.NoParams - 4, // 56: inx.INX.ListenToAcceptedBlocks:input_type -> inx.NoParams - 4, // 57: inx.INX.ListenToConfirmedBlocks:input_type -> inx.NoParams - 17, // 58: inx.INX.SubmitBlock:input_type -> inx.RawBlock - 18, // 59: inx.INX.ReadBlock:input_type -> inx.BlockId - 18, // 60: inx.INX.ReadBlockMetadata:input_type -> inx.BlockId - 13, // 61: inx.INX.ReadAcceptedBlocks:input_type -> inx.SlotRequest - 29, // 62: inx.INX.ReadTransactionMetadata:input_type -> inx.TransactionId - 23, // 63: inx.INX.ReadBlockIssuance:input_type -> inx.BlockIssuanceRequest - 25, // 64: inx.INX.ValidatePayload:input_type -> inx.RawPayload - 4, // 65: inx.INX.ReadUnspentOutputs:input_type -> inx.NoParams - 39, // 66: inx.INX.ReadIsCommitteeMember:input_type -> inx.AccountInfoRequest - 39, // 67: inx.INX.ReadIsCandidate:input_type -> inx.AccountInfoRequest - 39, // 68: inx.INX.ReadIsValidatorAccount:input_type -> inx.AccountInfoRequest - 14, // 69: inx.INX.ListenToLedgerUpdates:input_type -> inx.SlotRangeRequest - 4, // 70: inx.INX.ListenToAcceptedTransactions:input_type -> inx.NoParams - 30, // 71: inx.INX.ReadOutput:input_type -> inx.OutputId - 41, // 72: inx.INX.RegisterAPIRoute:input_type -> inx.APIRouteRequest - 41, // 73: inx.INX.UnregisterAPIRoute:input_type -> inx.APIRouteRequest - 42, // 74: inx.INX.PerformAPIRequest:input_type -> inx.APIRequest - 7, // 75: inx.INX.ReadNodeStatus:output_type -> inx.NodeStatus - 7, // 76: inx.INX.ListenToNodeStatus:output_type -> inx.NodeStatus - 5, // 77: inx.INX.ReadNodeConfiguration:output_type -> inx.NodeConfiguration - 27, // 78: inx.INX.ReadActiveRootBlocks:output_type -> inx.RootBlocksResponse - 15, // 79: inx.INX.ListenToCommitments:output_type -> inx.Commitment - 15, // 80: inx.INX.ReadCommitment:output_type -> inx.Commitment - 4, // 81: inx.INX.ForceCommitUntil:output_type -> inx.NoParams - 19, // 82: inx.INX.ListenToBlocks:output_type -> inx.Block - 21, // 83: inx.INX.ListenToAcceptedBlocks:output_type -> inx.BlockMetadata - 21, // 84: inx.INX.ListenToConfirmedBlocks:output_type -> inx.BlockMetadata - 18, // 85: inx.INX.SubmitBlock:output_type -> inx.BlockId - 17, // 86: inx.INX.ReadBlock:output_type -> inx.RawBlock - 21, // 87: inx.INX.ReadBlockMetadata:output_type -> inx.BlockMetadata - 20, // 88: inx.INX.ReadAcceptedBlocks:output_type -> inx.BlockWithMetadata - 22, // 89: inx.INX.ReadTransactionMetadata:output_type -> inx.TransactionMetadata - 24, // 90: inx.INX.ReadBlockIssuance:output_type -> inx.BlockIssuanceResponse - 26, // 91: inx.INX.ValidatePayload:output_type -> inx.PayloadValidationResponse - 32, // 92: inx.INX.ReadUnspentOutputs:output_type -> inx.UnspentOutput - 40, // 93: inx.INX.ReadIsCommitteeMember:output_type -> inx.BoolResponse - 40, // 94: inx.INX.ReadIsCandidate:output_type -> inx.BoolResponse - 40, // 95: inx.INX.ReadIsValidatorAccount:output_type -> inx.BoolResponse - 37, // 96: inx.INX.ListenToLedgerUpdates:output_type -> inx.LedgerUpdate - 38, // 97: inx.INX.ListenToAcceptedTransactions:output_type -> inx.AcceptedTransaction - 31, // 98: inx.INX.ReadOutput:output_type -> inx.OutputResponse - 4, // 99: inx.INX.RegisterAPIRoute:output_type -> inx.NoParams - 4, // 100: inx.INX.UnregisterAPIRoute:output_type -> inx.NoParams - 43, // 101: inx.INX.PerformAPIRequest:output_type -> inx.APIResponse - 75, // [75:102] is the sub-list for method output_type - 48, // [48:75] is the sub-list for method input_type + 4, // 56: inx.INX.ListenToBlockMetadata:input_type -> inx.NoParams + 17, // 57: inx.INX.SubmitBlock:input_type -> inx.RawBlock + 18, // 58: inx.INX.ReadBlock:input_type -> inx.BlockId + 18, // 59: inx.INX.ReadBlockMetadata:input_type -> inx.BlockId + 13, // 60: inx.INX.ReadAcceptedBlocks:input_type -> inx.SlotRequest + 29, // 61: inx.INX.ReadTransactionMetadata:input_type -> inx.TransactionId + 23, // 62: inx.INX.ReadBlockIssuance:input_type -> inx.BlockIssuanceRequest + 25, // 63: inx.INX.ValidatePayload:input_type -> inx.RawPayload + 4, // 64: inx.INX.ReadUnspentOutputs:input_type -> inx.NoParams + 39, // 65: inx.INX.ReadIsCommitteeMember:input_type -> inx.AccountInfoRequest + 39, // 66: inx.INX.ReadIsCandidate:input_type -> inx.AccountInfoRequest + 39, // 67: inx.INX.ReadIsValidatorAccount:input_type -> inx.AccountInfoRequest + 14, // 68: inx.INX.ListenToLedgerUpdates:input_type -> inx.SlotRangeRequest + 4, // 69: inx.INX.ListenToAcceptedTransactions:input_type -> inx.NoParams + 30, // 70: inx.INX.ReadOutput:input_type -> inx.OutputId + 41, // 71: inx.INX.RegisterAPIRoute:input_type -> inx.APIRouteRequest + 41, // 72: inx.INX.UnregisterAPIRoute:input_type -> inx.APIRouteRequest + 42, // 73: inx.INX.PerformAPIRequest:input_type -> inx.APIRequest + 7, // 74: inx.INX.ReadNodeStatus:output_type -> inx.NodeStatus + 7, // 75: inx.INX.ListenToNodeStatus:output_type -> inx.NodeStatus + 5, // 76: inx.INX.ReadNodeConfiguration:output_type -> inx.NodeConfiguration + 27, // 77: inx.INX.ReadActiveRootBlocks:output_type -> inx.RootBlocksResponse + 15, // 78: inx.INX.ListenToCommitments:output_type -> inx.Commitment + 15, // 79: inx.INX.ReadCommitment:output_type -> inx.Commitment + 4, // 80: inx.INX.ForceCommitUntil:output_type -> inx.NoParams + 19, // 81: inx.INX.ListenToBlocks:output_type -> inx.Block + 21, // 82: inx.INX.ListenToBlockMetadata:output_type -> inx.BlockMetadata + 18, // 83: inx.INX.SubmitBlock:output_type -> inx.BlockId + 17, // 84: inx.INX.ReadBlock:output_type -> inx.RawBlock + 21, // 85: inx.INX.ReadBlockMetadata:output_type -> inx.BlockMetadata + 20, // 86: inx.INX.ReadAcceptedBlocks:output_type -> inx.BlockWithMetadata + 22, // 87: inx.INX.ReadTransactionMetadata:output_type -> inx.TransactionMetadata + 24, // 88: inx.INX.ReadBlockIssuance:output_type -> inx.BlockIssuanceResponse + 26, // 89: inx.INX.ValidatePayload:output_type -> inx.PayloadValidationResponse + 32, // 90: inx.INX.ReadUnspentOutputs:output_type -> inx.UnspentOutput + 40, // 91: inx.INX.ReadIsCommitteeMember:output_type -> inx.BoolResponse + 40, // 92: inx.INX.ReadIsCandidate:output_type -> inx.BoolResponse + 40, // 93: inx.INX.ReadIsValidatorAccount:output_type -> inx.BoolResponse + 37, // 94: inx.INX.ListenToLedgerUpdates:output_type -> inx.LedgerUpdate + 38, // 95: inx.INX.ListenToAcceptedTransactions:output_type -> inx.AcceptedTransaction + 31, // 96: inx.INX.ReadOutput:output_type -> inx.OutputResponse + 4, // 97: inx.INX.RegisterAPIRoute:output_type -> inx.NoParams + 4, // 98: inx.INX.UnregisterAPIRoute:output_type -> inx.NoParams + 43, // 99: inx.INX.PerformAPIRequest:output_type -> inx.APIResponse + 74, // [74:100] is the sub-list for method output_type + 48, // [48:74] is the sub-list for method input_type 48, // [48:48] is the sub-list for extension type_name 48, // [48:48] is the sub-list for extension extendee 0, // [0:48] is the sub-list for field type_name diff --git a/go/inx_grpc.pb.go b/go/inx_grpc.pb.go index 50df19d..04d64ce 100644 --- a/go/inx_grpc.pb.go +++ b/go/inx_grpc.pb.go @@ -27,8 +27,7 @@ const ( INX_ReadCommitment_FullMethodName = "/inx.INX/ReadCommitment" INX_ForceCommitUntil_FullMethodName = "/inx.INX/ForceCommitUntil" INX_ListenToBlocks_FullMethodName = "/inx.INX/ListenToBlocks" - INX_ListenToAcceptedBlocks_FullMethodName = "/inx.INX/ListenToAcceptedBlocks" - INX_ListenToConfirmedBlocks_FullMethodName = "/inx.INX/ListenToConfirmedBlocks" + INX_ListenToBlockMetadata_FullMethodName = "/inx.INX/ListenToBlockMetadata" INX_SubmitBlock_FullMethodName = "/inx.INX/SubmitBlock" INX_ReadBlock_FullMethodName = "/inx.INX/ReadBlock" INX_ReadBlockMetadata_FullMethodName = "/inx.INX/ReadBlockMetadata" @@ -63,8 +62,7 @@ type INXClient interface { ForceCommitUntil(ctx context.Context, in *SlotRequest, opts ...grpc.CallOption) (*NoParams, error) // Blocks ListenToBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToBlocksClient, error) - ListenToAcceptedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToAcceptedBlocksClient, error) - ListenToConfirmedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToConfirmedBlocksClient, error) + ListenToBlockMetadata(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToBlockMetadataClient, error) SubmitBlock(ctx context.Context, in *RawBlock, opts ...grpc.CallOption) (*BlockId, error) ReadBlock(ctx context.Context, in *BlockId, opts ...grpc.CallOption) (*RawBlock, error) ReadBlockMetadata(ctx context.Context, in *BlockId, opts ...grpc.CallOption) (*BlockMetadata, error) @@ -242,12 +240,12 @@ func (x *iNXListenToBlocksClient) Recv() (*Block, error) { return m, nil } -func (c *iNXClient) ListenToAcceptedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToAcceptedBlocksClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[3], INX_ListenToAcceptedBlocks_FullMethodName, opts...) +func (c *iNXClient) ListenToBlockMetadata(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToBlockMetadataClient, error) { + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[3], INX_ListenToBlockMetadata_FullMethodName, opts...) if err != nil { return nil, err } - x := &iNXListenToAcceptedBlocksClient{stream} + x := &iNXListenToBlockMetadataClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -257,48 +255,16 @@ func (c *iNXClient) ListenToAcceptedBlocks(ctx context.Context, in *NoParams, op return x, nil } -type INX_ListenToAcceptedBlocksClient interface { +type INX_ListenToBlockMetadataClient interface { Recv() (*BlockMetadata, error) grpc.ClientStream } -type iNXListenToAcceptedBlocksClient struct { +type iNXListenToBlockMetadataClient struct { grpc.ClientStream } -func (x *iNXListenToAcceptedBlocksClient) Recv() (*BlockMetadata, error) { - m := new(BlockMetadata) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *iNXClient) ListenToConfirmedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToConfirmedBlocksClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[4], INX_ListenToConfirmedBlocks_FullMethodName, opts...) - if err != nil { - return nil, err - } - x := &iNXListenToConfirmedBlocksClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type INX_ListenToConfirmedBlocksClient interface { - Recv() (*BlockMetadata, error) - grpc.ClientStream -} - -type iNXListenToConfirmedBlocksClient struct { - grpc.ClientStream -} - -func (x *iNXListenToConfirmedBlocksClient) Recv() (*BlockMetadata, error) { +func (x *iNXListenToBlockMetadataClient) Recv() (*BlockMetadata, error) { m := new(BlockMetadata) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -334,7 +300,7 @@ func (c *iNXClient) ReadBlockMetadata(ctx context.Context, in *BlockId, opts ... } func (c *iNXClient) ReadAcceptedBlocks(ctx context.Context, in *SlotRequest, opts ...grpc.CallOption) (INX_ReadAcceptedBlocksClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[5], INX_ReadAcceptedBlocks_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[4], INX_ReadAcceptedBlocks_FullMethodName, opts...) if err != nil { return nil, err } @@ -393,7 +359,7 @@ func (c *iNXClient) ValidatePayload(ctx context.Context, in *RawPayload, opts .. } func (c *iNXClient) ReadUnspentOutputs(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ReadUnspentOutputsClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[6], INX_ReadUnspentOutputs_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[5], INX_ReadUnspentOutputs_FullMethodName, opts...) if err != nil { return nil, err } @@ -452,7 +418,7 @@ func (c *iNXClient) ReadIsValidatorAccount(ctx context.Context, in *AccountInfoR } func (c *iNXClient) ListenToLedgerUpdates(ctx context.Context, in *SlotRangeRequest, opts ...grpc.CallOption) (INX_ListenToLedgerUpdatesClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[7], INX_ListenToLedgerUpdates_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[6], INX_ListenToLedgerUpdates_FullMethodName, opts...) if err != nil { return nil, err } @@ -484,7 +450,7 @@ func (x *iNXListenToLedgerUpdatesClient) Recv() (*LedgerUpdate, error) { } func (c *iNXClient) ListenToAcceptedTransactions(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToAcceptedTransactionsClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[8], INX_ListenToAcceptedTransactions_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[7], INX_ListenToAcceptedTransactions_FullMethodName, opts...) if err != nil { return nil, err } @@ -566,8 +532,7 @@ type INXServer interface { ForceCommitUntil(context.Context, *SlotRequest) (*NoParams, error) // Blocks ListenToBlocks(*NoParams, INX_ListenToBlocksServer) error - ListenToAcceptedBlocks(*NoParams, INX_ListenToAcceptedBlocksServer) error - ListenToConfirmedBlocks(*NoParams, INX_ListenToConfirmedBlocksServer) error + ListenToBlockMetadata(*NoParams, INX_ListenToBlockMetadataServer) error SubmitBlock(context.Context, *RawBlock) (*BlockId, error) ReadBlock(context.Context, *BlockId) (*RawBlock, error) ReadBlockMetadata(context.Context, *BlockId) (*BlockMetadata, error) @@ -625,11 +590,8 @@ func (UnimplementedINXServer) ForceCommitUntil(context.Context, *SlotRequest) (* func (UnimplementedINXServer) ListenToBlocks(*NoParams, INX_ListenToBlocksServer) error { return status.Errorf(codes.Unimplemented, "method ListenToBlocks not implemented") } -func (UnimplementedINXServer) ListenToAcceptedBlocks(*NoParams, INX_ListenToAcceptedBlocksServer) error { - return status.Errorf(codes.Unimplemented, "method ListenToAcceptedBlocks not implemented") -} -func (UnimplementedINXServer) ListenToConfirmedBlocks(*NoParams, INX_ListenToConfirmedBlocksServer) error { - return status.Errorf(codes.Unimplemented, "method ListenToConfirmedBlocks not implemented") +func (UnimplementedINXServer) ListenToBlockMetadata(*NoParams, INX_ListenToBlockMetadataServer) error { + return status.Errorf(codes.Unimplemented, "method ListenToBlockMetadata not implemented") } func (UnimplementedINXServer) SubmitBlock(context.Context, *RawBlock) (*BlockId, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitBlock not implemented") @@ -848,45 +810,24 @@ func (x *iNXListenToBlocksServer) Send(m *Block) error { return x.ServerStream.SendMsg(m) } -func _INX_ListenToAcceptedBlocks_Handler(srv interface{}, stream grpc.ServerStream) error { +func _INX_ListenToBlockMetadata_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(NoParams) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(INXServer).ListenToAcceptedBlocks(m, &iNXListenToAcceptedBlocksServer{stream}) + return srv.(INXServer).ListenToBlockMetadata(m, &iNXListenToBlockMetadataServer{stream}) } -type INX_ListenToAcceptedBlocksServer interface { +type INX_ListenToBlockMetadataServer interface { Send(*BlockMetadata) error grpc.ServerStream } -type iNXListenToAcceptedBlocksServer struct { +type iNXListenToBlockMetadataServer struct { grpc.ServerStream } -func (x *iNXListenToAcceptedBlocksServer) Send(m *BlockMetadata) error { - return x.ServerStream.SendMsg(m) -} - -func _INX_ListenToConfirmedBlocks_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(NoParams) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(INXServer).ListenToConfirmedBlocks(m, &iNXListenToConfirmedBlocksServer{stream}) -} - -type INX_ListenToConfirmedBlocksServer interface { - Send(*BlockMetadata) error - grpc.ServerStream -} - -type iNXListenToConfirmedBlocksServer struct { - grpc.ServerStream -} - -func (x *iNXListenToConfirmedBlocksServer) Send(m *BlockMetadata) error { +func (x *iNXListenToBlockMetadataServer) Send(m *BlockMetadata) error { return x.ServerStream.SendMsg(m) } @@ -1305,13 +1246,8 @@ var INX_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, }, { - StreamName: "ListenToAcceptedBlocks", - Handler: _INX_ListenToAcceptedBlocks_Handler, - ServerStreams: true, - }, - { - StreamName: "ListenToConfirmedBlocks", - Handler: _INX_ListenToConfirmedBlocks_Handler, + StreamName: "ListenToBlockMetadata", + Handler: _INX_ListenToBlockMetadata_Handler, ServerStreams: true, }, { diff --git a/go/utils.go b/go/utils.go index a657260..4ac3237 100644 --- a/go/utils.go +++ b/go/utils.go @@ -75,14 +75,14 @@ func WrapRootBlocks(rootBlocks map[iotago.BlockID]iotago.CommitmentID) *RootBloc } } -func (x *RootBlocksResponse) Unwrap() (map[iotago.BlockID]iotago.CommitmentID, error) { +func (x *RootBlocksResponse) Unwrap() map[iotago.BlockID]iotago.CommitmentID { rootBlockUnwrapped := make(map[iotago.BlockID]iotago.CommitmentID) for _, rootBlock := range x.GetRootBlocks() { rootBlockUnwrapped[rootBlock.GetBlockId().Unwrap()] = rootBlock.GetCommitmentId().Unwrap() } - return rootBlockUnwrapped, nil + return rootBlockUnwrapped } func WrapSlotRequest(slot iotago.SlotIndex) *SlotRequest { @@ -105,18 +105,18 @@ func (x BlockMetadata_BlockState) Unwrap() api.BlockState { return api.BlockState(x) } -func WrapBlockMetadata(blockMetadata *api.BlockMetadataResponse) (*BlockMetadata, error) { +func WrapBlockMetadata(blockMetadata *api.BlockMetadataResponse) *BlockMetadata { return &BlockMetadata{ BlockId: NewBlockId(blockMetadata.BlockID), BlockState: WrapBlockState(blockMetadata.BlockState), - }, nil + } } -func (x *BlockMetadata) Unwrap() (*api.BlockMetadataResponse, error) { +func (x *BlockMetadata) Unwrap() *api.BlockMetadataResponse { return &api.BlockMetadataResponse{ BlockID: x.GetBlockId().Unwrap(), BlockState: x.GetBlockState().Unwrap(), - }, nil + } } // TransactionMetadata diff --git a/proto/inx.proto b/proto/inx.proto index e7f0830..944e24d 100644 --- a/proto/inx.proto +++ b/proto/inx.proto @@ -17,8 +17,7 @@ service INX { // Blocks rpc ListenToBlocks(NoParams) returns (stream Block); - rpc ListenToAcceptedBlocks(NoParams) returns (stream BlockMetadata); - rpc ListenToConfirmedBlocks(NoParams) returns (stream BlockMetadata); + rpc ListenToBlockMetadata(NoParams) returns (stream BlockMetadata); rpc SubmitBlock(RawBlock) returns (BlockId); rpc ReadBlock(BlockId) returns (RawBlock); rpc ReadBlockMetadata(BlockId) returns (BlockMetadata);