Anton Kaliaev
|
d6a87d3c43
|
[rpc] DumpConsensusState: output state as json rather than string
Before:
```
{
"jsonrpc": "2.0",
"id": "",
"result": {
"round_state": "RoundState{\n H:10 R:0 S:RoundStepNewHeight\n StartTime: 2017-10-09 13:07:24.841134374 +0400 +04\n CommitTime: 2017-10-09 13:07:23.841134374 +0400 +04\n Validators: ValidatorSet{\n Proposer: Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n Validators:\n Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n }\n Proposal: \u003cnil\u003e\n ProposalBlock: nil-PartSet nil-Block\n LockedRound: 0\n LockedBlock: nil-PartSet nil-Block\n Votes: HeightVoteSet{H:10 R:0~0\n VoteSet{H:10 R:0 T:1 +2/3:\u003cnil\u003e BA{1:_} map[]}\n VoteSet{H:10 R:0 T:2 +2/3:\u003cnil\u003e BA{1:_} map[]}\n }\n LastCommit: VoteSet{H:9 R:0 T:2 +2/3:947F67A7B85439AF2CD5DFED376C51AC7BD67AEE:1:365E9983E466 BA{1:X} map[]}\n LastValidators: ValidatorSet{\n Proposer: Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n Validators:\n Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n }\n}",
"peer_round_states": []
}
}
```
After:
```
{
"jsonrpc": "2.0",
"id": "",
"result": {
"round_state": {
"Height": 1691,
"Round": 0,
"Step": 1,
"StartTime": "2017-10-09T14:08:09.129491764+04:00",
"CommitTime": "2017-10-09T14:08:08.129491764+04:00",
"Validators": {
"validators": [
{
"address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
"pub_key": {
"type": "ed25519",
"data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
},
"voting_power": 10,
"accum": 0
}
],
"proposer": {
"address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
"pub_key": {
"type": "ed25519",
"data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
},
"voting_power": 10,
"accum": 0
}
},
"Proposal": null,
"ProposalBlock": null,
"ProposalBlockParts": null,
"LockedRound": 0,
"LockedBlock": null,
"LockedBlockParts": null,
"Votes": {},
"CommitRound": -1,
"LastCommit": {},
"LastValidators": {
"validators": [
{
"address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
"pub_key": {
"type": "ed25519",
"data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
},
"voting_power": 10,
"accum": 0
}
],
"proposer": {
"address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
"pub_key": {
"type": "ed25519",
"data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
},
"voting_power": 10,
"accum": 0
}
}
},
"peer_round_states": {
"75EC8F15D244A421202F9725CD4DE509EE50303670310CF7530EF25E2B7C524B": {
"Height": 1691,
"Round": 0,
"Step": 1,
"StartTime": "2017-10-09T14:08:08.563251997+04:00",
"Proposal": false,
"ProposalBlockPartsHeader": {
"total": 0,
"hash": ""
},
"ProposalBlockParts": null,
"ProposalPOLRound": -1,
"ProposalPOL": null,
"Prevotes": null,
"Precommits": null,
"LastCommitRound": 0,
"LastCommit": null,
"CatchupCommitRound": -1,
"CatchupCommit": null
}
}
}
}
```
|
7 years ago |