aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/common.go1
-rw-r--r--ethutil/parsing.go2
-rw-r--r--ethutil/rlp_test.go6
-rw-r--r--ethutil/trie_test.go2
4 files changed, 9 insertions, 2 deletions
diff --git a/ethutil/common.go b/ethutil/common.go
index f15b10e6d..c63af29a6 100644
--- a/ethutil/common.go
+++ b/ethutil/common.go
@@ -36,6 +36,7 @@ func CurrencyToString(num *big.Int) string {
var (
Big1 = big.NewInt(1)
+ Big2 = big.NewInt(1)
Big0 = big.NewInt(0)
Big256 = big.NewInt(0xff)
)
diff --git a/ethutil/parsing.go b/ethutil/parsing.go
index 8929f0829..16ed2d06d 100644
--- a/ethutil/parsing.go
+++ b/ethutil/parsing.go
@@ -131,7 +131,7 @@ func Instr(instr string) (int, []string, error) {
// Script compilation functions
// Compiles strings to machine code
-func Compile(instructions ...interface{}) (script []string) {
+func Assemble(instructions ...interface{}) (script []string) {
script = make([]string, len(instructions))
for i, val := range instructions {
diff --git a/ethutil/rlp_test.go b/ethutil/rlp_test.go
index 2a58bfc0f..dc10db632 100644
--- a/ethutil/rlp_test.go
+++ b/ethutil/rlp_test.go
@@ -2,6 +2,7 @@ package ethutil
import (
"bytes"
+ "fmt"
"math/big"
"reflect"
"testing"
@@ -119,6 +120,11 @@ func TestEncodeDecodeBytes(t *testing.T) {
}
}
+func TestEncodeZero(t *testing.T) {
+ b := NewValue(0).Encode()
+ fmt.Println(b)
+}
+
func BenchmarkEncodeDecode(b *testing.B) {
for i := 0; i < b.N; i++ {
bytes := Encode([]interface{}{"dog", "god", "cat"})
diff --git a/ethutil/trie_test.go b/ethutil/trie_test.go
index 79e5de921..0be512d9f 100644
--- a/ethutil/trie_test.go
+++ b/ethutil/trie_test.go
@@ -1,7 +1,7 @@
package ethutil
import (
- "fmt"
+ _ "fmt"
"reflect"
"testing"
)