aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/responses.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/responses.go')
-rw-r--r--rpc/responses.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/rpc/responses.go b/rpc/responses.go
index 884b7e69b..9fdf60c02 100644
--- a/rpc/responses.go
+++ b/rpc/responses.go
@@ -3,6 +3,7 @@ package rpc
import (
"encoding/json"
+ "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
)
@@ -303,3 +304,13 @@ func NewLogsRes(logs state.Logs) (ls []LogRes) {
return
}
+
+func NewHashesRes(hs []common.Hash) []string {
+ hashes := make([]string, len(hs))
+
+ for i, hash := range hs {
+ hashes[i] = hash.Hex()
+ }
+
+ return hashes
+}