forked from TrueCloudLab/frostfs-node
[#973] ir/subnet: Remove alphabet re-signature of Delete
request
Subnet contract doesn't work with alphabet signatures. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
41eaa1e246
commit
52fc5bde6e
2 changed files with 7 additions and 62 deletions
|
@ -135,8 +135,6 @@ func (s *Server) listenSubnet() {
|
|||
|
||||
// subnet creation
|
||||
listenEvent(subnetCreateEvName, subnetevents.ParseNotaryPut, s.onlyAlphabetEventHandler(s.catchSubnetCreation))
|
||||
// subnet removal
|
||||
listenEvent(subnetRemoveEvName, subnetevents.ParseNotaryDelete, s.onlyAlphabetEventHandler(s.catchSubnetRemoval))
|
||||
}
|
||||
|
||||
func (s *Server) listenSubnetWithoutNotary() {
|
||||
|
@ -303,25 +301,15 @@ func (s *Server) handleSubnetRemoval(e event.Event) {
|
|||
return
|
||||
}
|
||||
|
||||
notaryMainTx := delEv.NotaryMainTx()
|
||||
// send new transaction
|
||||
var prm morphsubnet.DeletePrm
|
||||
|
||||
isNotary := notaryMainTx != nil
|
||||
if isNotary {
|
||||
// re-sign notary request
|
||||
err = s.morphClient.NotarySignAndInvokeTX(notaryMainTx)
|
||||
} else {
|
||||
// send new transaction
|
||||
var prm morphsubnet.DeletePrm
|
||||
|
||||
prm.SetID(delEv.ID())
|
||||
prm.SetTxHash(delEv.TxHash())
|
||||
|
||||
_, err = s.subnetHandler.morphClient.Delete(prm)
|
||||
}
|
||||
prm.SetID(delEv.ID())
|
||||
prm.SetTxHash(delEv.TxHash())
|
||||
|
||||
_, err = s.subnetHandler.morphClient.Delete(prm)
|
||||
if err != nil {
|
||||
s.log.Error("approve subnet removal",
|
||||
zap.Bool("notary", isNotary),
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue