Skip to content

Commit

Permalink
Merge pull request #504 from uprendis/feature/fix-legacy-db-startup
Browse files Browse the repository at this point in the history
Fix startup with legacy DB presets
  • Loading branch information
uprendis authored Aug 17, 2023
2 parents 2ef5800 + ac69d0e commit 0342e5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions cmd/opera/launcher/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,9 @@ func makeNode(ctx *cli.Context, cfg *config, genesisStore *genesisstore.Store) (
if err != nil {
utils.Fatalf("Failed to create the service: %v", err)
}
err = engine.Bootstrap(svc.GetConsensusCallbacks())
err = engine.StartFrom(svc.GetConsensusCallbacks(), gdb.GetEpoch(), gdb.GetValidators())
if err != nil {
utils.Fatalf("Failed to bootstrap the engine: %v", err)
}
err = engine.Reset(gdb.GetEpoch(), gdb.GetValidators())
if err != nil {
utils.Fatalf("Failed to reset the engine: %v", err)
utils.Fatalf("Failed to start the engine: %v", err)
}
svc.ReprocessEpochEvents()
if cfg.Emitter.Validator.ID != 0 {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/Fantom-foundation/go-opera
go 1.17

require (
github.com/Fantom-foundation/lachesis-base v0.0.0-20230629034932-42bae8eeb426
github.com/Fantom-foundation/lachesis-base v0.0.0-20230817040848-1326ba9aa59b
github.com/allegro/bigcache v1.2.1 // indirect
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40 // indirect
github.com/cespare/cp v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
github.com/Fantom-foundation/go-ethereum v1.10.8-ftm-rc12 h1:SyXrKgZNRBIQN1XZXOH1WZZoPft2qm0jC7pZC9nRCw4=
github.com/Fantom-foundation/go-ethereum v1.10.8-ftm-rc12/go.mod h1:IeQDjWCNBj/QiWIPosfF6/kRC6pHPNs7W7LfBzjj+P4=
github.com/Fantom-foundation/lachesis-base v0.0.0-20230629034932-42bae8eeb426 h1:TCsCxpzd2ETqHJMdkw09Ck1mmnNgx/Z4h6i6kDOexYI=
github.com/Fantom-foundation/lachesis-base v0.0.0-20230629034932-42bae8eeb426/go.mod h1:Ogv5etzSmM2rQ4eN3OfmyitwWaaPjd4EIDiW/NAbYGk=
github.com/Fantom-foundation/lachesis-base v0.0.0-20230817040848-1326ba9aa59b h1:/9+Cau3cWaKy9fQk/NWq3RJKrwEjgrhME6ACy4RjLns=
github.com/Fantom-foundation/lachesis-base v0.0.0-20230817040848-1326ba9aa59b/go.mod h1:Ogv5etzSmM2rQ4eN3OfmyitwWaaPjd4EIDiW/NAbYGk=
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
github.com/JekaMas/go-mutesting v1.1.2/go.mod h1:dmuQcwN24lbeoiakrWYmmPQ/YcLYSRADixUrGdcCkxI=
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
Expand Down

0 comments on commit 0342e5d

Please sign in to comment.