浏览代码

Msg->message
Return->Return

skyfffire 2 年之前
父节点
当前提交
32cd23d843
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 3 3
      internal/ethapi/call_result.go
  2. 1 1
      internal/ethapi/public_block_chain_api.go

+ 3 - 3
internal/ethapi/call_result.go

@@ -4,7 +4,7 @@ import "github.com/ethereum/go-ethereum/common/hexutil"
 
 // CallResult is the result of one call.
 type CallResult struct {
-	Return  hexutil.Bytes
-	Msg     string
-	Success bool
+	Return  hexutil.Bytes `json:"return"`
+	Msg     string        `json:"message"`
+	Success bool          `json:"state"`
 }

+ 1 - 1
internal/ethapi/public_block_chain_api.go

@@ -117,7 +117,7 @@ func (s *PublicBlockChainAPI) BatchCall(ctx context.Context, config BatchCallCon
 		if err != nil {
 			results = append(results, CallResult{Success: false, Return: nil, Msg: err.Error()})
 		} else {
-			results = append(results, CallResult{Success: true, Return: result.Return(), Msg: "Success."})
+			results = append(results, CallResult{Success: true, Return: result.Return()})
 		}
 	}
 	return results, nil