forked from TrueCloudLab/frostfs-contract
[#220] subnet: append version in Update
Current contract doesn't provide version in arguments, thus disable check in `_deploy`. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
912eaab8d8
commit
26d51b526a
1 changed files with 4 additions and 3 deletions
|
@ -58,8 +58,8 @@ const (
|
||||||
// _deploy function sets up initial list of inner ring public keys.
|
// _deploy function sets up initial list of inner ring public keys.
|
||||||
func _deploy(data interface{}, isUpdate bool) {
|
func _deploy(data interface{}, isUpdate bool) {
|
||||||
if isUpdate {
|
if isUpdate {
|
||||||
args := data.([]interface{})
|
//args := data.([]interface{})
|
||||||
common.CheckVersion(args[len(args)-1].(int))
|
//common.CheckVersion(args[len(args)-1].(int))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,8 @@ func Update(script []byte, manifest []byte, data interface{}) {
|
||||||
panic("only committee can update contract")
|
panic("only committee can update contract")
|
||||||
}
|
}
|
||||||
|
|
||||||
contract.Call(interop.Hash160(management.Hash), "update", contract.All, script, manifest, data)
|
contract.Call(interop.Hash160(management.Hash), "update", contract.All,
|
||||||
|
script, manifest, common.AppendVersion(data))
|
||||||
runtime.Log("subnet contract updated")
|
runtime.Log("subnet contract updated")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue