frostfs-node/pkg/innerring/processors/governance/events.go
Pavel Karpy bad739258e [#971] *: Add notification TX hash to neofs/netmap morph client calls
Add hash of the TX that generated notification
to neofs/netmap event structures. Adapt all
neofs/netmap wrapper calls to new structures.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-11-19 09:58:03 +03:00

26 lines
661 B
Go

package governance
import "github.com/nspcc-dev/neo-go/pkg/util"
// Sync is an event to start governance synchronization.
type Sync struct {
// txHash is used in notary environmental
// for calculating unique but same for
// all notification receivers values.
txHash util.Uint256
}
// TxHash returns hash of the TX that triggers
// synchronization process.
func (s Sync) TxHash() util.Uint256 {
return s.txHash
}
// MorphEvent implements Event interface.
func (s Sync) MorphEvent() {}
// NewSyncEvent creates Sync event that was produced
// in transaction with txHash hash.
func NewSyncEvent(txHash util.Uint256) Sync {
return Sync{txHash: txHash}
}