2020-10-15 11:45:29 +00:00
|
|
|
package transaction
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Conflicts represents attribute for conflicting transactions.
|
|
|
|
type Conflicts struct {
|
|
|
|
Hash util.Uint256 `json:"hash"`
|
|
|
|
}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// DecodeBinary implements the io.Serializable interface.
|
2020-10-15 11:45:29 +00:00
|
|
|
func (c *Conflicts) DecodeBinary(br *io.BinReader) {
|
2022-06-01 11:25:30 +00:00
|
|
|
c.Hash.DecodeBinary(br)
|
2020-10-15 11:45:29 +00:00
|
|
|
}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// EncodeBinary implements the io.Serializable interface.
|
2020-10-15 11:45:29 +00:00
|
|
|
func (c *Conflicts) EncodeBinary(w *io.BinWriter) {
|
2022-06-01 11:25:30 +00:00
|
|
|
c.Hash.EncodeBinary(w)
|
2020-10-15 11:45:29 +00:00
|
|
|
}
|
|
|
|
|
2023-04-03 10:34:24 +00:00
|
|
|
func (c *Conflicts) toJSONMap(m map[string]any) {
|
2020-10-15 11:45:29 +00:00
|
|
|
m["hash"] = c.Hash
|
|
|
|
}
|
2024-04-27 17:16:05 +00:00
|
|
|
|
|
|
|
// Copy implements the AttrValue interface.
|
|
|
|
func (c *Conflicts) Copy() AttrValue {
|
|
|
|
return &Conflicts{
|
|
|
|
Hash: c.Hash,
|
|
|
|
}
|
|
|
|
}
|