Skip to content

Commit

Permalink
fix the RPC getinfo consensus nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricfung committed Mar 1, 2019
1 parent 8adf4e6 commit e232ac4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion rpc/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,18 @@ func getInfo(store storage.Store, node *kernel.Node) (map[string]interface{}, er
"hash": r.Hash.String(),
}
}

nodes := make([]map[string]interface{}, 0)
for id, n := range node.ConsensusNodes {
nodes = append(nodes, map[string]interface{}{
"node": id,
"signer": n.Signer.String(),
"payee": n.Payee.String(),
"state": n.State,
})
}
info["graph"] = map[string]interface{}{
"consensus": node.ConsensusNodes,
"consensus": nodes,
"cache": cacheGraph,
"final": finalGraph,
"topology": node.TopologicalOrder(),
Expand Down

0 comments on commit e232ac4

Please sign in to comment.