Skip to content

Commit 2c92949

Browse files
committed
Remove legacy
1 parent f952791 commit 2c92949

13 files changed

Lines changed: 2 additions & 1642 deletions

File tree

cli/service/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
pb "github.com/MinterTeam/minter-go-node/cli/cli_pb"
77
"github.com/MinterTeam/minter-go-node/config"
88
"github.com/MinterTeam/minter-go-node/core/minter"
9+
"github.com/MinterTeam/minter-go-node/core/state/candidates"
910
"github.com/MinterTeam/minter-go-node/core/types"
10-
"github.com/MinterTeam/minter-go-node/legacy/candidates"
1111
"github.com/MinterTeam/minter-go-node/version"
1212
"github.com/golang/protobuf/ptypes"
1313
"github.com/golang/protobuf/ptypes/empty"

cmd/minter/cmd/export.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func export(cmd *cobra.Command, args []string) error {
7373
log.Panicf("Cannot new state at given height: %s", err)
7474
}
7575

76-
exportTimeStart, newState := time.Now(), currentState.Export11To12(height)
76+
exportTimeStart, newState := time.Now(), currentState.Export(height)
7777
fmt.Printf("State has been exported. Took %s", time.Since(exportTimeStart))
7878

7979
if startHeight > 0 {

core/state/state.go

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ import (
1717
"github.com/MinterTeam/minter-go-node/core/state/waitlist"
1818
"github.com/MinterTeam/minter-go-node/core/types"
1919
"github.com/MinterTeam/minter-go-node/helpers"
20-
legacyAccounts "github.com/MinterTeam/minter-go-node/legacy/accounts"
21-
legacyApp "github.com/MinterTeam/minter-go-node/legacy/app"
22-
legacyCandidates "github.com/MinterTeam/minter-go-node/legacy/candidates"
23-
legacyCoins "github.com/MinterTeam/minter-go-node/legacy/coins"
24-
legacyFrozenfunds "github.com/MinterTeam/minter-go-node/legacy/frozenfunds"
2520
"github.com/MinterTeam/minter-go-node/tree"
2621
db "github.com/tendermint/tm-db"
2722
"gopkg.in/errgo.v2/fmt/errors"
@@ -95,57 +90,6 @@ func (cs *CheckState) Tree() tree.ReadOnlyTree {
9590
return cs.state.Tree()
9691
}
9792

98-
func (cs *CheckState) Export11To12(height uint64) types.AppState {
99-
iavlTree := cs.state.tree
100-
101-
candidatesState, err := legacyCandidates.NewCandidates(nil, iavlTree)
102-
if err != nil {
103-
log.Panicf("Create new state at height %d failed: %s", height, err)
104-
}
105-
106-
validatorsState, err := validators.NewValidators(nil, iavlTree)
107-
if err != nil {
108-
log.Panicf("Create new state at height %d failed: %s", height, err)
109-
}
110-
111-
appState, err := legacyApp.NewApp(nil, iavlTree)
112-
if err != nil {
113-
log.Panicf("Create new state at height %d failed: %s", height, err)
114-
}
115-
116-
frozenFundsState, err := legacyFrozenfunds.NewFrozenFunds(nil, iavlTree)
117-
if err != nil {
118-
log.Panicf("Create new state at height %d failed: %s", height, err)
119-
}
120-
121-
accountsState, err := legacyAccounts.NewAccounts(nil, iavlTree)
122-
if err != nil {
123-
log.Panicf("Create new state at height %d failed: %s", height, err)
124-
}
125-
126-
coinsState, err := legacyCoins.NewCoins(nil, iavlTree)
127-
if err != nil {
128-
log.Panicf("Create new state at height %d failed: %s", height, err)
129-
}
130-
131-
checksState, err := checks.NewChecks(iavlTree)
132-
if err != nil {
133-
log.Panicf("Create new state at height %d failed: %s", height, err)
134-
}
135-
136-
state := new(types.AppState)
137-
appState.Export(state, height)
138-
coinsMap := coinsState.Export(state)
139-
validatorsState.Export(state)
140-
candidatesMap := candidatesState.Export(state, coinsMap)
141-
frozenFundsState.Export(state, height, coinsMap, candidatesMap)
142-
accountsState.Export(state, coinsMap)
143-
checksState.Export(state)
144-
coinsState.Export(state)
145-
146-
return *state
147-
}
148-
14993
type State struct {
15094
App *app.App
15195
Validators *validators.Validators

legacy/accounts/accounts.go

Lines changed: 0 additions & 210 deletions
This file was deleted.

0 commit comments

Comments
 (0)