Skip to content

Commit

Permalink
fix minor errors
Browse files Browse the repository at this point in the history
  • Loading branch information
weiihann committed Oct 25, 2024
1 parent d0b83e2 commit 3d320d8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ feedernode: juno-cached
./build/juno \
--network=sepolia \
--log-level=debug \
--db-path="/Users/pnowosie/juno/snapshots/juno-sepolia" \
--db-path=./p2p-dbs/feedernode \
--p2p \
--p2p-feeder-node \
--p2p-addr=/ip4/0.0.0.0/tcp/7777 \
Expand All @@ -136,7 +136,6 @@ node1: juno-cached
--metrics-port=9091 \
--pprof \
--pprof-port=9096 \
--p2p-sync-mode="snap"

# --p2p-peers=/ip4/127.0.0.1/tcp/7778/p2p/12D3KooWDQVMmK6cQrfFcWUoFF8Ch5vYegfwiP5Do2SFC2NAXeBk \
Expand Down
9 changes: 5 additions & 4 deletions blockchain/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ func New(database db.DB, network *utils.Network) *Blockchain {
}

// TODO: Used only for testing though...
err := bc.seedSnapshot()
if err != nil {
fmt.Printf("Error seeding snapshot %s", err)
}
// TODO: the following is only used for snap sync, uncomment when we need it again
// err := bc.seedSnapshot()
// if err != nil {
// fmt.Printf("Error seeding snapshot %s", err)
// }

return bc
}
Expand Down
3 changes: 0 additions & 3 deletions blockchain/snap_server_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,7 @@ func NewBlockchainCloser(bc *Blockchain, log utils.SimpleLogger) *BlockchainClos
}

func (b *BlockchainCloser) Run(ctx context.Context) error {
b.log.Infow("BlockchainCloser has started")

<-ctx.Done()
b.bc.Close()
b.log.Infow("BlockchainCloser has stopped")
return nil
}
3 changes: 1 addition & 2 deletions p2p/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ type Service struct {
topicsLock sync.RWMutex

downloader *Downloader
synchroniser *SyncService
gossipTracer *gossipTracer

database db.DB
Expand Down Expand Up @@ -414,7 +413,7 @@ func (s *Service) SetProtocolHandler(pid protocol.ID, handler func(network.Strea
}

func (s *Service) WithListener(l junoSync.EventListener) {
s.synchroniser.WithListener(l)
s.downloader.WithListener(l)
}

func (s *Service) WithGossipTracer() {
Expand Down

0 comments on commit 3d320d8

Please sign in to comment.