frostfs-node/pkg/morph/event/netmap/add_peer.go
Evgenii Stratonikov 47b0ec33c3
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
[#337] netmap: Remove unused events
Done in TrueCloudLab/frostfs-contract#16.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-12 09:19:38 +00:00

28 lines
617 B
Go

package netmap
import (
"github.com/nspcc-dev/neo-go/pkg/network/payload"
)
type AddPeer struct {
NodeBytes []byte
// For notary notifications only.
// Contains raw transactions of notary request.
Request *payload.P2PNotaryRequest
}
// MorphEvent implements Neo:Morph Event interface.
func (AddPeer) MorphEvent() {}
func (s AddPeer) Node() []byte {
return s.NodeBytes
}
// NotaryRequest returns raw notary request if notification
// was received via notary service. Otherwise, returns nil.
func (s AddPeer) NotaryRequest() *payload.P2PNotaryRequest {
return s.Request
}
const expectedItemNumAddPeer = 1