Skip to content

Commit

Permalink
fix: add chainid to admin_nodeInfo rpc api
Browse files Browse the repository at this point in the history
  • Loading branch information
anhnhgutech committed Nov 9, 2024
1 parent 2d4f6e7 commit 8a55584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ private void BuildNodeInfo()
private void UpdateEthProtocolInfo()
{
_nodeInfo.Protocols["eth"].Difficulty = _blockTree.Head?.TotalDifficulty ?? 0;
_nodeInfo.Protocols["eth"].NewtorkId = _blockTree.ChainId;
_nodeInfo.Protocols["eth"].NewtorkId = _blockTree.NetworkId;
_nodeInfo.Protocols["eth"].ChainId = _blockTree.ChainId;
_nodeInfo.Protocols["eth"].HeadHash = _blockTree.HeadHash;
_nodeInfo.Protocols["eth"].GenesisHash = _blockTree.GenesisHash;
_nodeInfo.Protocols["eth"].Config = _parameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class EthProtocolInfo
public Hash256 HeadHash { get; set; }
[JsonPropertyName("network")]
public ulong NewtorkId { get; set; }
[JsonPropertyName("chainId")]
public ulong ChainId { get; set; }
[JsonPropertyName("config")]
public ChainParameters Config { get; set; }
}
Expand Down

0 comments on commit 8a55584

Please sign in to comment.