Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gRPC): add only_connected parameter to getNetworkInfo API #1264

Merged
merged 6 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion www/grpc/gen/dart/network.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ import 'package:protobuf/protobuf.dart' as $pb;

class GetNetworkInfoRequest extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNetworkInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..aOB(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'onlyConnected')
..hasRequiredFields = false
;

GetNetworkInfoRequest._() : super();
factory GetNetworkInfoRequest() => create();
factory GetNetworkInfoRequest({
$core.bool? onlyConnected,
}) {
final _result = create();
if (onlyConnected != null) {
_result.onlyConnected = onlyConnected;
}
return _result;
}
factory GetNetworkInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory GetNetworkInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
Expand All @@ -38,6 +47,15 @@ class GetNetworkInfoRequest extends $pb.GeneratedMessage {
@$core.pragma('dart2js:noInline')
static GetNetworkInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetNetworkInfoRequest>(create);
static GetNetworkInfoRequest? _defaultInstance;

@$pb.TagNumber(1)
$core.bool get onlyConnected => $_getBF(0);
@$pb.TagNumber(1)
set onlyConnected($core.bool v) { $_setBool(0, v); }
@$pb.TagNumber(1)
$core.bool hasOnlyConnected() => $_has(0);
@$pb.TagNumber(1)
void clearOnlyConnected() => clearField(1);
}

class GetNetworkInfoResponse extends $pb.GeneratedMessage {
Expand Down
5 changes: 4 additions & 1 deletion www/grpc/gen/dart/network.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ import 'dart:typed_data' as $typed_data;
@$core.Deprecated('Use getNetworkInfoRequestDescriptor instead')
const GetNetworkInfoRequest$json = const {
'1': 'GetNetworkInfoRequest',
'2': const [
const {'1': 'only_connected', '3': 1, '4': 1, '5': 8, '10': 'onlyConnected'},
],
};

/// Descriptor for `GetNetworkInfoRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List getNetworkInfoRequestDescriptor = $convert.base64Decode('ChVHZXROZXR3b3JrSW5mb1JlcXVlc3Q=');
final $typed_data.Uint8List getNetworkInfoRequestDescriptor = $convert.base64Decode('ChVHZXROZXR3b3JrSW5mb1JlcXVlc3QSJQoOb25seV9jb25uZWN0ZWQYASABKAhSDW9ubHlDb25uZWN0ZWQ=');
@$core.Deprecated('Use getNetworkInfoResponseDescriptor instead')
const GetNetworkInfoResponse$json = const {
'1': 'GetNetworkInfoResponse',
Expand Down
16 changes: 15 additions & 1 deletion www/grpc/gen/docs/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2034,7 +2034,21 @@ GetNetworkInfoRequest
<span class="badge text-bg-secondary fs-6 align-top">msg</span>
</h3>
<p>Request message for retrieving overall network information.</p>
Message has no fields.

<table class="table table-bordered table-sm">
<thead>
<tr><td>Field</td><td>Type</td><td>Description</td></tr>
</thead>
<tbody class="table-group-divider">
<tr>
<td class="fw-bold">only_connected</td>
<td>
<a href="#bool">bool</a>
</td>
<td>Only returns the peers with connected status </td>
</tr>
</tbody>
</table>
<h3 id="pactus.GetNetworkInfoResponse">
GetNetworkInfoResponse
<span class="badge text-bg-secondary fs-6 align-top">msg</span>
Expand Down
17 changes: 17 additions & 0 deletions www/grpc/gen/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2465,6 +2465,23 @@ <h3 id="pactus.GetNetworkInfoRequest">GetNetworkInfoRequest</h3>
<p>Request message for retrieving overall network information.</p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>only_connected</td>
<td><a href="#bool">bool</a></td>
<td></td>
<td><p>Only returns the peers with connected status </p></td>
</tr>

</tbody>
</table>





Expand Down
5 changes: 5 additions & 0 deletions www/grpc/gen/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,11 @@ Blockchain service defines RPC methods for interacting with the blockchain.
Request message for retrieving overall network information.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| only_connected | [bool](#bool) | | Only returns the peers with connected status |





Expand Down
4 changes: 3 additions & 1 deletion www/grpc/gen/docs/json-rpc.html
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,9 @@ <h3>pactus.network.get_network_info <span class="badge text-bg-primary fs-6 alig
<h3>Parameters</h3>
<pre>
<code>
{}
{
"only_connected": true|false // (boolean) Only returns the peers with connected status
}
</code>
</pre>

Expand Down
4 changes: 3 additions & 1 deletion www/grpc/gen/docs/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,9 @@ pactus.network.get_network_info retrieves information about the overall network.

### Parameters
```json
{}
{
"only_connected": true|false // (boolean) Only returns the peers with connected status
}
```

### Result
Expand Down
2 changes: 2 additions & 0 deletions www/grpc/gen/go/network.cobra.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading