diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-03 07:31:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-03 07:31:15 +0800 |
commit | 76c9c8d653ae49e347598f1bbd34c821354c9567 (patch) | |
tree | 0d9fab91ab28cecb55e941fb0adf5de36dc8459a /ethdb/database_test.go | |
parent | bd4f51ff3c75c186dbc8a71439953c8fc05b16cd (diff) | |
download | dexon-76c9c8d653ae49e347598f1bbd34c821354c9567.tar.gz dexon-76c9c8d653ae49e347598f1bbd34c821354c9567.tar.zst dexon-76c9c8d653ae49e347598f1bbd34c821354c9567.zip |
Compress data on db level. Closes #174
Diffstat (limited to 'ethdb/database_test.go')
-rw-r--r-- | ethdb/database_test.go | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/ethdb/database_test.go b/ethdb/database_test.go index bb1b4de2a..2cbaf58e0 100644 --- a/ethdb/database_test.go +++ b/ethdb/database_test.go @@ -1,6 +1,28 @@ package ethdb +/* import ( - _ "fmt" - _ "testing" + "bytes" + "testing" ) + +func TestCompression(t *testing.T) { + ethutil.ReadConfig("", "/tmp", "") + + db, err := NewLDBDatabase("testdb") + if err != nil { + t.Fatal(err) + } + + in := make([]byte, 10) + db.Put([]byte("test1"), in) + out, err := db.Get([]byte("test1")) + if err != nil { + t.Fatal(err) + } + + if bytes.Compare(out, in) != 0 { + t.Error("put get", in, out) + } +} +*/ |