aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/utils/flags.go2
-rw-r--r--core/genesis.go4
-rw-r--r--ethdb/database.go10
-rw-r--r--trie/cache.go4
4 files changed, 12 insertions, 8 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 7f9c696e0..b66fe24cc 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -154,7 +154,7 @@ var (
GasPriceFlag = cli.StringFlag{
Name: "gasprice",
Usage: "Sets the minimal gasprice when mining transactions",
- Value: new(big.Int).Mul(big.NewInt(1), common.Szabo).String(),
+ Value: new(big.Int).Mul(big.NewInt(500), common.Shannon).String(),
}
UnlockedAccountFlag = cli.StringFlag{
diff --git a/core/genesis.go b/core/genesis.go
index 7d3727b82..a88e88ea8 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -82,6 +82,10 @@ func WriteGenesisBlock(stateDb, blockDb common.Database, reader io.Reader) (*typ
}, nil, nil, nil)
block.Td = difficulty
+ if block := GetBlockByHash(blockDb, block.Hash()); block != nil {
+ return nil, fmt.Errorf("Block %x already in database", block.Hash())
+ }
+
statedb.Sync()
err = WriteBlock(blockDb, block)
diff --git a/ethdb/database.go b/ethdb/database.go
index 9c9dfe9a1..bf27df592 100644
--- a/ethdb/database.go
+++ b/ethdb/database.go
@@ -23,7 +23,6 @@ import (
"sync"
"time"
- "github.com/ethereum/go-ethereum/compression/rle"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/metrics"
@@ -100,12 +99,12 @@ func (self *LDBDatabase) Put(key []byte, value []byte) error {
defer self.putTimer.UpdateSince(time.Now())
}
// Generate the data to write to disk, update the meter and write
- dat := rle.Compress(value)
+ //value = rle.Compress(value)
if self.writeMeter != nil {
- self.writeMeter.Mark(int64(len(dat)))
+ self.writeMeter.Mark(int64(len(value)))
}
- return self.db.Put(key, dat, nil)
+ return self.db.Put(key, value, nil)
}
// Get returns the given key if it's present.
@@ -126,7 +125,8 @@ func (self *LDBDatabase) Get(key []byte) ([]byte, error) {
if self.readMeter != nil {
self.readMeter.Mark(int64(len(dat)))
}
- return rle.Decompress(dat)
+ return dat, nil
+ //return rle.Decompress(dat)
}
// Delete deletes the key from the queue and database
diff --git a/trie/cache.go b/trie/cache.go
index 2949a5d64..fdaba5de1 100644
--- a/trie/cache.go
+++ b/trie/cache.go
@@ -17,7 +17,6 @@
package trie
import (
- "github.com/ethereum/go-ethereum/compression/rle"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/syndtr/goleveldb/leveldb"
@@ -49,7 +48,8 @@ func (self *Cache) Get(key []byte) []byte {
func (self *Cache) Put(key []byte, data []byte) {
// write the data to the ldb batch
- self.batch.Put(key, rle.Compress(data))
+ //self.batch.Put(key, rle.Compress(data))
+ self.batch.Put(key, data)
self.store[string(key)] = data
}