forked from TrueCloudLab/frostfs-contract
[#59] proxy: Check committee address in Verify function
For committee operations in side chain we can't use 5\7 multi address, instead we should use 4\7 for this case. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
8af80e67aa
commit
7ba5d50fd4
4 changed files with 32 additions and 4 deletions
|
@ -57,7 +57,12 @@ func Verify() bool {
|
|||
ctx := storage.GetReadOnlyContext()
|
||||
sig := common.InnerRingMultiAddressViaStorage(ctx, netmapContractKey)
|
||||
|
||||
return runtime.CheckWitness(sig)
|
||||
if !runtime.CheckWitness(sig) {
|
||||
sig = common.CommitteeMultiAddressViaStorage(ctx, netmapContractKey)
|
||||
return runtime.CheckWitness(sig)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func Version() int {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue