go fmt
This commit is contained in:
parent
0289c414fd
commit
74f68b0e00
14
jsonrpc.go
14
jsonrpc.go
@ -27,16 +27,16 @@ func (err JSONRPCError) Error() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type JSONRPCResponse struct {
|
type JSONRPCResponse struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
JSONRPC string `json:"jsonrpc"`
|
JSONRPC string `json:"jsonrpc"`
|
||||||
Result json.RawMessage `json:"result"`
|
Result json.RawMessage `json:"result"`
|
||||||
Error *JSONRPCError `json:"error"`
|
Error *JSONRPCError `json:"error"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type JSONRPCRequest struct {
|
type JSONRPCRequest struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
JSONRPC string `json:"jsonrpc"`
|
JSONRPC string `json:"jsonrpc"`
|
||||||
Method string `json:"method"`
|
Method string `json:"method"`
|
||||||
Params []json.RawMessage `json:"params"`
|
Params []json.RawMessage `json:"params"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package main
|
|||||||
import "encoding/json"
|
import "encoding/json"
|
||||||
import "github.com/joeshaw/iso8601"
|
import "github.com/joeshaw/iso8601"
|
||||||
|
|
||||||
|
|
||||||
type SteemVirtualTransaction struct {
|
type SteemVirtualTransaction struct {
|
||||||
TxID string `json:"trx_id"`
|
TxID string `json:"trx_id"`
|
||||||
BlockNum uint64 `json:"block"`
|
BlockNum uint64 `json:"block"`
|
||||||
@ -20,13 +19,13 @@ func (rpc *JSONRPC) GetVirtualOpsInBlock(blockNum int) ([]*SteemVirtualTransacti
|
|||||||
return nil, err1
|
return nil, err1
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp := make([]SteemVirtualTransaction)
|
tmp := make([]SteemVirtualTransaction)
|
||||||
//var result []interface{}
|
//var result []interface{}
|
||||||
err2 := json.Unmarshal(raw, &tmp)
|
err2 := json.Unmarshal(raw, &tmp)
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
return nil, err2
|
return nil, err2
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rpc *JSONRPC) GetOpsInBlock(blockNum int) (json.RawMessage, error) {
|
func (rpc *JSONRPC) GetOpsInBlock(blockNum int) (json.RawMessage, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user