xeth, core, event/filter, rpc: new block and transaction filters

This commit is contained in:
obscuren
2015-05-06 17:51:32 +02:00
parent 97c37356fd
commit 7e160a677d
5 changed files with 202 additions and 87 deletions

View File

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