forked from TrueCloudLab/frostfs-contract
[#225] netmap: Do not emit some events in notary-enabled mode
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
a4f9d52cfc
commit
f6766a144f
2 changed files with 9 additions and 16 deletions
|
@ -233,7 +233,9 @@ func AddPeer(nodeInfo []byte) {
|
|||
publicKey := nodeInfo[2:35] // offset:2, len:33
|
||||
|
||||
common.CheckWitness(publicKey)
|
||||
runtime.Notify("AddPeer", nodeInfo)
|
||||
if notaryDisabled {
|
||||
runtime.Notify("AddPeer", nodeInfo)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -287,7 +289,9 @@ func UpdateState(state int, publicKey interop.PublicKey) {
|
|||
// just emit the notification for alphabet.
|
||||
if !notaryDisabled || len(nodeKey) == 0 {
|
||||
common.CheckWitness(publicKey)
|
||||
runtime.Notify("UpdateState", state, publicKey)
|
||||
if notaryDisabled {
|
||||
runtime.Notify("UpdateState", state, publicKey)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue