forked from TrueCloudLab/frostfs-node
[#1557] morph/event: Remove embedded structs from scriptHashWithValue
Also, make them public, because otherwise `unused` linter complains. ``` pkg/morph/event/utils.go:25:2 unused field `typ` is unused ``` This complain is wrong, though: we _use_ `typ` field because the whole struct is used as a map key. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
3821645085
commit
7853dbc315
2 changed files with 6 additions and 24 deletions
|
@ -20,13 +20,9 @@ type scriptHashValue struct {
|
|||
hash util.Uint160
|
||||
}
|
||||
|
||||
type typeValue struct {
|
||||
typ Type
|
||||
}
|
||||
|
||||
type scriptHashWithType struct {
|
||||
scriptHashValue
|
||||
typeValue
|
||||
Hash util.Uint160
|
||||
Type Type
|
||||
}
|
||||
|
||||
type notaryRequestTypes struct {
|
||||
|
@ -73,16 +69,6 @@ func (s scriptHashValue) ScriptHash() util.Uint160 {
|
|||
return s.hash
|
||||
}
|
||||
|
||||
// SetType is an event type setter.
|
||||
func (s *typeValue) SetType(v Type) {
|
||||
s.typ = v
|
||||
}
|
||||
|
||||
// GetType is an event type getter.
|
||||
func (s typeValue) GetType() Type {
|
||||
return s.typ
|
||||
}
|
||||
|
||||
// WorkerPoolHandler sets closure over worker pool w with passed handler h.
|
||||
func WorkerPoolHandler(w util2.WorkerPool, h Handler, log *logger.Logger) Handler {
|
||||
return func(ctx context.Context, e Event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue