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