github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/pkg/core/transaction/conflicts.go (about) 1 package transaction 2 3 import ( 4 "github.com/nspcc-dev/neo-go/pkg/io" 5 "github.com/nspcc-dev/neo-go/pkg/util" 6 ) 7 8 // Conflicts represents attribute for conflicting transactions. 9 type Conflicts struct { 10 Hash util.Uint256 `json:"hash"` 11 } 12 13 // DecodeBinary implements the io.Serializable interface. 14 func (c *Conflicts) DecodeBinary(br *io.BinReader) { 15 c.Hash.DecodeBinary(br) 16 } 17 18 // EncodeBinary implements the io.Serializable interface. 19 func (c *Conflicts) EncodeBinary(w *io.BinWriter) { 20 c.Hash.EncodeBinary(w) 21 } 22 23 func (c *Conflicts) toJSONMap(m map[string]any) { 24 m["hash"] = c.Hash 25 } 26 27 // Copy implements the AttrValue interface. 28 func (c *Conflicts) Copy() AttrValue { 29 return &Conflicts{ 30 Hash: c.Hash, 31 } 32 }