forked from TrueCloudLab/frostfs-node
Evgenii Stratonikov
47b0ec33c3
Done in TrueCloudLab/frostfs-contract#16. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
28 lines
617 B
Go
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
|