aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-17 03:31:02 +0800
committerobscuren <geffobscura@gmail.com>2014-02-17 03:31:02 +0800
commit7264044122d2ceef413667ad8473746a40a44782 (patch)
tree3c57c548f6fc366cc448c64f4d601f59e084de52
parentf1d6f1bd1793767a5596d4c277651e2264c1cf8e (diff)
downloaddexon-7264044122d2ceef413667ad8473746a40a44782.tar
dexon-7264044122d2ceef413667ad8473746a40a44782.tar.gz
dexon-7264044122d2ceef413667ad8473746a40a44782.tar.bz2
dexon-7264044122d2ceef413667ad8473746a40a44782.tar.lz
dexon-7264044122d2ceef413667ad8473746a40a44782.tar.xz
dexon-7264044122d2ceef413667ad8473746a40a44782.tar.zst
dexon-7264044122d2ceef413667ad8473746a40a44782.zip
Added a few tests
-rw-r--r--ethutil/rlp_test.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/ethutil/rlp_test.go b/ethutil/rlp_test.go
index 54f929ebd..2a58bfc0f 100644
--- a/ethutil/rlp_test.go
+++ b/ethutil/rlp_test.go
@@ -119,43 +119,6 @@ func TestEncodeDecodeBytes(t *testing.T) {
}
}
-/*
-var ZeroHash256 = make([]byte, 32)
-var ZeroHash160 = make([]byte, 20)
-var EmptyShaList = Sha3Bin(Encode([]interface{}{}))
-
-var GenisisHeader = []interface{}{
- // Previous hash (none)
- //"",
- ZeroHash256,
- // Sha of uncles
- Sha3Bin(Encode([]interface{}{})),
- // Coinbase
- ZeroHash160,
- // Root state
- "",
- // Sha of transactions
- //EmptyShaList,
- Sha3Bin(Encode([]interface{}{})),
- // Difficulty
- BigPow(2, 22),
- // Time
- //big.NewInt(0),
- int64(0),
- // extra
- "",
- // Nonce
- big.NewInt(42),
-}
-
-func TestEnc(t *testing.T) {
- //enc := Encode(GenisisHeader)
- //fmt.Printf("%x (%d)\n", enc, len(enc))
- h, _ := hex.DecodeString("f8a0a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a06d076baa9c4074fb2df222dd16a96b0155a1e6686b3e5748b4e9ca0a208a425ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493478340000080802a")
- fmt.Printf("%x\n", Sha3Bin(h))
-}
-*/
-
func BenchmarkEncodeDecode(b *testing.B) {
for i := 0; i < b.N; i++ {
bytes := Encode([]interface{}{"dog", "god", "cat"})