Skip to content

Commit

Permalink
Merge pull request #1711 from moreal/rc-v100321-4
Browse files Browse the repository at this point in the history
Release v100321-4
  • Loading branch information
moreal authored Nov 22, 2022
2 parents 7c396f7 + e08b6e4 commit f01a7ff
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions NineChronicles.Headless/GraphTypes/NodeStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,19 @@ public NodeStatusType(StandaloneContext context)
}
}
);
Field<IntGraphType>(
name: "stagedTxIdsCount",
description: "The number of ids of staged transactions from the current node.",
resolve: fieldContext =>
{
if (context.BlockChain is null)
{
throw new InvalidOperationException($"{nameof(context.BlockChain)} is null.");
}

return context.BlockChain.GetStagedTransactionIds().Count;
}
);
Field<NonNullGraphType<BlockHeaderType>>(
name: "genesis",
description: "Block header of the genesis block from the current chain.",
Expand All @@ -144,6 +157,12 @@ context.BlockChain is { } blockChain
resolve: _ => context.AgentAddresses.Keys
);

Field<IntGraphType>(
name: "subscriberAddressesCount",
description: "The number of a list of subscribers' address",
resolve: _ => context.AgentAddresses.Count
);

Field<StringGraphType>(
name: "productVersion",
description: "A version of NineChronicles.Headless",
Expand Down

0 comments on commit f01a7ff

Please sign in to comment.