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

[rpc] Extend getversion RPC response with additional protocol settings #3443

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions src/Plugins/RpcServer/RpcServer.Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ protected internal virtual JToken GetVersion(JArray _params)
forkJson["blockheight"] = hf.Value;
return forkJson;
}));
protocol["standbycommittee"] = new JArray(system.Settings.StandbyCommittee.Select(u => new JString(u.ToString())));
protocol["seedlist"] = new JArray(system.Settings.SeedList.Select(u => new JString(u)));
json["rpc"] = rpc;
json["protocol"] = protocol;
return json;
Expand Down
2 changes: 2 additions & 0 deletions tests/Neo.Plugins.RpcServer.Tests/UT_RpcServer.Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public void TestGetVersion()
Assert.IsTrue(protocol.ContainsProperty("maxvaliduntilblockincrement"));
Assert.IsTrue(protocol.ContainsProperty("maxtransactionsperblock"));
Assert.IsTrue(protocol.ContainsProperty("memorypoolmaxtransactions"));
Assert.IsTrue(protocol.ContainsProperty("standbycommittee"));
Assert.IsTrue(protocol.ContainsProperty("seedlist"));
}

#region SendRawTransaction Tests
Expand Down