Skip to content

Commit

Permalink
Fix "jsonpc" typos in docs and rpc.go (DNAProject#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoFreitasgit authored and laizy committed Jun 23, 2018
1 parent 0fc07c2 commit 4a8a7b1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/specifications/cli_user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,14 @@ Command:
```
$ ./ontology set --debuglevel 1
When setting succeed, the result will show as follow:
map[desc:SUCCESS error:0 id:0 jsonpc:2.0 result:true]
map[desc:SUCCESS error:0 id:0 jsonrpc:2.0 result:true]
```

### Example for setting consensus
```
$ ./ontology set --consensus on
When setting succeed, the result will show as follow:
map[desc:SUCCESS error:0 id:0 jsonpc:2.0 result:true]
map[desc:SUCCESS error:0 id:0 jsonrpc:2.0 result:true]
```
---

Expand Down
24 changes: 12 additions & 12 deletions docs/specifications/rpc_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Response when verbose = 1:
"desc": "SUCCESS",
"error": 0,
"id": 1,
"jsonpc": "2.0",
"jsonrpc": "2.0",
"result": {
"Hash": "95555da65d6feaa7cde13d6bf12131f750b670569d98c63813441cf24a99c0d2",
"Header": {
Expand Down Expand Up @@ -394,7 +394,7 @@ or
"desc": "SUCCESS",
"error": 0,
"id": 1,
"jsonpc": "2.0",
"jsonrpc": "2.0",
"result": {
"Version": 0,
"Nonce": 3377520203,
Expand Down Expand Up @@ -548,7 +548,7 @@ Reponse
"desc": "SUCCESS",
"error": 0,
"id": 1,
"jsonpc": "2.0",
"jsonrpc": "2.0",
"result": "498db60e96828581eff991c58fa46abbfd97d2f4a4f9915a11f85c54f2a2fedf"
}
```
Expand Down Expand Up @@ -706,7 +706,7 @@ or
"desc": "SUCCESS",
"error": 0,
"id": 1,
"jsonpc": "2.0",
"jsonrpc": "2.0",
"result": {
"TxHash": "20046da68ef6a91f6959caa798a5ac7660cc80cf4098921bc63604d93208a8ac",
"State": 1,
Expand Down Expand Up @@ -758,7 +758,7 @@ Response:
"desc": "SUCCESS",
"error": 0,
"id": 1,
"jsonpc": "2.0",
"jsonrpc": "2.0",
"result": {
"VmType": 255,
"Code": "4f4e5420546f6b656e",
Expand Down Expand Up @@ -868,7 +868,7 @@ Response:
"desc": "SUCCESS",
"error": 0,
"id": 1,
"jsonpc": "2.0",
"jsonrpc": "2.0",
"result": 10
}
```
Expand Down Expand Up @@ -901,7 +901,7 @@ Response:
"desc":"SUCCESS",
"error":0,
"id":1,
"jsonpc":"2.0",
"jsonrpc":"2.0",
"result":{
"ont": "2500",
"ong": "0",
Expand Down Expand Up @@ -938,7 +938,7 @@ Response:
"desc":"SUCCESS",
"error":0,
"id":1,
"jsonpc":"2.0",
"jsonrpc":"2.0",
"result":{
"Type": "MerkleProof",
"TransactionsRoot": "fe3a4ee8a44e3e588de55de1b8fe08f08b6184d9c062cf7316fb9481eb57b9e6",
Expand Down Expand Up @@ -989,7 +989,7 @@ Response:
"desc":"SUCCESS",
"error":0,
"id":1,
"jsonpc":"2.0",
"jsonrpc":"2.0",
"result":{
"gasprice": 0,
"height": 1
Expand Down Expand Up @@ -1022,7 +1022,7 @@ Response:
"desc":"SUCCESS",
"error":0,
"id":1,
"jsonpc":"2.0",
"jsonrpc":"2.0",
"result": "10"
}
```
Expand Down Expand Up @@ -1052,7 +1052,7 @@ Response:
"desc":"SUCCESS",
"error":0,
"id":1,
"jsonpc":"2.0",
"jsonrpc":"2.0",
"result": "204957950400000"
}
```
Expand Down Expand Up @@ -1082,7 +1082,7 @@ Response:
"desc":"SUCCESS",
"error":0,
"id":1,
"jsonpc":"2.0",
"jsonrpc":"2.0",
"result": {
"Hash": "ea5e5219d2f1591f4feef89885c3f38c83d3a3474a5622cf8cd3de1b93849603",
"Height": 100,
Expand Down
2 changes: 1 addition & 1 deletion http/base/rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func Handle(w http.ResponseWriter, r *http.Request) {
if ok {
response := function(request["params"].([]interface{}))
data, err := json.Marshal(map[string]interface{}{
"jsonpc": "2.0",
"jsonrpc": "2.0",
"error": response["error"],
"desc": response["desc"],
"result": response["result"],
Expand Down

0 comments on commit 4a8a7b1

Please sign in to comment.