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
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Conflicts) toJSONMap(m map[string]interface{}) {
|
|
|
|
m["hash"] = c.Hash
|
|
|
|
}
|