12
endpoint := "您的QuickNode端点"13
目标, opts := getGrpcOptions(endpoint)14
grpcConn, err := grpc.Dial(目标, opts...)20
height := int64(1234567)21
tc := tm.NewServiceClient(grpcConn)22
resp, err := tc.GetValidatorSetByHeight(context.Background(), &tm.GetValidatorSetByHeightRequest{Height: 65899000})26
fmt.Println("高度的验证器已设置为:", height)27
for _, val := range resp.Validators {28
fmt.Println(val.GetAddress())
12
endpoint := "您的QuickNode端点"13
目标, opts := getGrpcOptions(endpoint)14
grpcConn, err := grpc.Dial(目标, opts...)20
height := int64(1234567)21
tc := tm.NewServiceClient(grpcConn)22
resp, err := tc.GetValidatorSetByHeight(context.Background(), &tm.GetValidatorSetByHeightRequest{Height: 65899000})26
fmt.Println("高度的验证器已设置为:", height)27
for _, val := range resp.Validators {28
fmt.Println(val.GetAddress())