From 176115e22ecc5e86179784ba5027c84e538423c4 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Mon, 16 Mar 2015 16:49:51 -0400 Subject: More empty param tests --- rpc/util.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rpc/util.go') diff --git a/rpc/util.go b/rpc/util.go index 08f404c99..e5610dc2c 100644 --- a/rpc/util.go +++ b/rpc/util.go @@ -45,6 +45,11 @@ func UnmarshalRawMessages(b []byte, iface interface{}, number *int64) (err error return NewDecodeParamError(err.Error()) } + // Hrm... Occurs when no params + if len(data) == 0 { + return NewDecodeParamError("No data") + } + // Number index determines the index in the array for a possible block number numberIndex := 0 -- cgit v1.2.3 From 0a1eeca41e6ba5920ba65d9b41654768299bc7e3 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 18 Mar 2015 13:00:01 +0100 Subject: conversions. -compilable- --- rpc/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rpc/util.go') diff --git a/rpc/util.go b/rpc/util.go index e5610dc2c..b9b0fa442 100644 --- a/rpc/util.go +++ b/rpc/util.go @@ -155,11 +155,11 @@ func toLogs(logs state.Logs) (ls []Log) { for i, log := range logs { var l Log l.Topic = make([]string, len(log.Topics())) - l.Address = toHex(log.Address()) + l.Address = log.Address().Hex() l.Data = toHex(log.Data()) l.Number = log.Number() for j, topic := range log.Topics() { - l.Topic[j] = toHex(topic) + l.Topic[j] = topic.Hex() } ls[i] = l } -- cgit v1.2.3