From 20d6b1dc64cceb2a8af1976f9d74a47508d481b1 Mon Sep 17 00:00:00 2001 From: Arijit Das Date: Mon, 13 Dec 2021 20:42:02 +0530 Subject: [PATCH] Small changes. --- environments/example.toml | 11 +++++------ pkg/snapshot/service.go | 14 ++------------ 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/environments/example.toml b/environments/example.toml index 2a26401..4f87fe1 100644 --- a/environments/example.toml +++ b/environments/example.toml @@ -1,13 +1,12 @@ [database] - name = "vulcanize_testing" + name = "vulcanize_public" hostname = "localhost" - port = 8077 - user = "vdbm" - password = "password" + port = 5432 + user = "postgres" [leveldb] - path = "/Users/arijitdas/Library/Ethereum/rinkeby/geth/chaindata" - ancient = "/Users/arijitdas/Library/Ethereum/rinkeby/geth/chaindata/ancient" + path = "/Users/user/Library/Ethereum/geth/chaindata" + ancient = "/Users/user/Library/Ethereum/geth/chaindata/ancient" [snapshot] blockHeight = 58176 \ No newline at end of file diff --git a/pkg/snapshot/service.go b/pkg/snapshot/service.go index 723d468..6497032 100644 --- a/pkg/snapshot/service.go +++ b/pkg/snapshot/service.go @@ -98,12 +98,7 @@ func (s *Service) CreateLatestSnapshot() error { } trieDB := s.stateDB.TrieDB() - err = s.createSnapshot(t.NodeIterator([]byte{}), trieDB, headerID) - if err != nil { - return err - } - - return nil + return s.createSnapshot(t.NodeIterator([]byte{}), trieDB, headerID) } func (s *Service) CreateSnapshot(height uint64) error { @@ -127,12 +122,7 @@ func (s *Service) CreateSnapshot(height uint64) error { } trieDB := s.stateDB.TrieDB() - err = s.createSnapshot(t.NodeIterator([]byte{}), trieDB, headerID) - if err != nil { - return err - } - - return nil + return s.createSnapshot(t.NodeIterator([]byte{}), trieDB, headerID) } func (s *Service) createSnapshot(it trie.NodeIterator, trieDB *trie.Database, headerID int64) error {