forked from TrueCloudLab/frostfs-contract
[#74] audit: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
5e22426768
commit
07617dd083
1 changed files with 11 additions and 1 deletions
|
@ -78,7 +78,16 @@ func Migrate(script []byte, manifest []byte) bool {
|
||||||
|
|
||||||
func Put(rawAuditResult []byte) bool {
|
func Put(rawAuditResult []byte) bool {
|
||||||
ctx := storage.GetContext()
|
ctx := storage.GetContext()
|
||||||
innerRing := common.InnerRingNodes()
|
notaryDisabled := storage.Get(ctx, notaryDisabledKey).(bool)
|
||||||
|
|
||||||
|
var innerRing []common.IRNode
|
||||||
|
|
||||||
|
if notaryDisabled {
|
||||||
|
netmapContract := storage.Get(ctx, netmapContractKey).(interop.Hash160)
|
||||||
|
innerRing = common.InnerRingNodesFromNetmap(netmapContract)
|
||||||
|
} else {
|
||||||
|
innerRing = common.InnerRingNodes()
|
||||||
|
}
|
||||||
|
|
||||||
hdr := newAuditHeader(rawAuditResult)
|
hdr := newAuditHeader(rawAuditResult)
|
||||||
presented := false
|
presented := false
|
||||||
|
@ -153,6 +162,7 @@ func list(it iterator.Iterator) [][]byte {
|
||||||
ignore := [][]byte{
|
ignore := [][]byte{
|
||||||
[]byte(netmapContractKey),
|
[]byte(netmapContractKey),
|
||||||
[]byte(common.OwnerKey),
|
[]byte(common.OwnerKey),
|
||||||
|
[]byte(notaryDisabledKey),
|
||||||
}
|
}
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
|
|
Loading…
Reference in a new issue