This commit is contained in:
Jeffrey Paul 2018-10-17 23:31:43 -07:00
parent 0289c414fd
commit 74f68b0e00
Signed by: sneak
GPG Key ID: 052443F4DF2A55C2
2 changed files with 12 additions and 13 deletions

View File

@ -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"`
}

View File

@ -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) {