[#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:
Evgenii Stratonikov 2022-01-24 11:30:03 +03:00 committed by Alex Vanin
parent 912eaab8d8
commit 26d51b526a

View file

@ -58,8 +58,8 @@ const (
// _deploy function sets up initial list of inner ring public keys.
func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
args := data.([]interface{})
common.CheckVersion(args[len(args)-1].(int))
//args := data.([]interface{})
//common.CheckVersion(args[len(args)-1].(int))
return
}
@ -78,7 +78,8 @@ func Update(script []byte, manifest []byte, data interface{}) {
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")
}