forked from TrueCloudLab/frostfs-contract
[#112] Remove to v0.9.2 migration code
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
9840f29372
commit
c7ed05cc2e
2 changed files with 0 additions and 50 deletions
|
@ -65,7 +65,6 @@ func _deploy(data interface{}, isUpdate bool) {
|
|||
ctx := storage.GetContext()
|
||||
|
||||
if isUpdate {
|
||||
migrateNetmapCandidates(ctx) // from v0.9.1 to v0.9.2
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -114,24 +113,6 @@ func _deploy(data interface{}, isUpdate bool) {
|
|||
runtime.Log("netmap contract initialized")
|
||||
}
|
||||
|
||||
func migrateNetmapCandidates(ctx storage.Context) {
|
||||
const netmapKey = "netmap"
|
||||
|
||||
data := storage.Get(ctx, netmapKey)
|
||||
if data == nil {
|
||||
return
|
||||
}
|
||||
|
||||
candidates := std.Deserialize(data.([]byte)).([]netmapNode)
|
||||
|
||||
for i := range candidates {
|
||||
candidate := candidates[i]
|
||||
addToNetmap(ctx, candidate.node)
|
||||
}
|
||||
|
||||
storage.Delete(ctx, netmapKey)
|
||||
}
|
||||
|
||||
// Migrate method updates contract source code and manifest. Can be invoked
|
||||
// only by contract owner.
|
||||
func Migrate(script []byte, manifest []byte, data interface{}) bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue