change harmony db path

pull/293/head
Minh Doan 6 years ago committed by Minh Doan
parent 9762ab75bd
commit f1c38ee0d5
  1. 3
      cmd/harmony.go
  2. 1
      core/genesis.go
  3. 2
      test/deploy.sh

@ -49,8 +49,7 @@ func attackDetermination(attackedMode int) bool {
// InitLDBDatabase initializes a LDBDatabase.
func InitLDBDatabase(ip string, port string) (*ethdb.LDBDatabase, error) {
// TODO(minhdoan): Refactor this.
dbFileName := "/tmp/harmony_" + ip + port + ".dat"
dbFileName := fmt.Sprintf("./db/harmony_%s_%s", ip, port)
var err = os.RemoveAll(dbFileName)
if err != nil {
fmt.Println(err.Error())

@ -225,7 +225,6 @@ func (g *Genesis) ToBlock(db ethdb.Database) *types.Block {
if db == nil {
utils.GetLogInstance().Error("db should be initialized")
os.Exit(1)
// db = ethdb.NewMemDatabase()
}
statedb, _ := state.New(common.Hash{}, state.NewDatabase(db))
for addr, account := range g.Alloc {

@ -24,7 +24,7 @@ function cleanup() {
done
# Remove bc_config.json before starting experiment.
rm -f bc_config.json
rm -rf /tmp/harmony*
rm -rf ./db/harmony_*
}
function killnode() {

Loading…
Cancel
Save