Skip to content

Commit

Permalink
feat: add "self" command to NodeState query
Browse files Browse the repository at this point in the history
  • Loading branch information
limebell committed Jun 20, 2024
1 parent e199116 commit 628d50d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Version DPoS
interface and its implementations. [[#3762]]
- (Libplanet.Explorer) Added `ValidatorPower` field to `VoteType`.
[[#3737], [#3813]]
- (Libplanet.Explorer) Added `self` field to `NoteStateType`. [[#3841]]
- (Libplanet.Types) Added `ValidatorPower` property to `IVoteMetadata`
interface and its implementations. [[#3737], [#3813]]

Expand All @@ -57,6 +58,7 @@ Version DPoS
[#3762]: https://github.com/planetarium/libplanet/pull/3762
[#3764]: https://github.com/planetarium/libplanet/pull/3764
[#3813]: https://github.com/planetarium/libplanet/pull/3813
[#3841]: https://github.com/planetarium/libplanet/pull/3841


Version Sloth
Expand Down
4 changes: 4 additions & 0 deletions Libplanet.Explorer/GraphTypes/NodeStateType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public NodeStateType()
{
Name = "NodeState";

Field<NonNullGraphType<BoundPeerType>>(
name: "self",
resolve: context => context.Source.Swarm.AsPeer
);
Field<NonNullGraphType<BooleanGraphType>>(
name: "preloaded",
resolve: context => context.Source.Preloaded
Expand Down

0 comments on commit 628d50d

Please sign in to comment.