mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-11 15:30:07 +00:00
21 lines
455 B
Go
21 lines
455 B
Go
package transaction
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
|
)
|
|
|
|
// MinerTX represents a miner transaction.
|
|
type MinerTX struct {
|
|
// Random number to avoid hash collision.
|
|
Nonce uint32
|
|
}
|
|
|
|
// DecodeBinary implements Serializable interface.
|
|
func (tx *MinerTX) DecodeBinary(r *io.BinReader) {
|
|
tx.Nonce = r.ReadU32LE()
|
|
}
|
|
|
|
// EncodeBinary implements Serializable interface.
|
|
func (tx *MinerTX) EncodeBinary(w *io.BinWriter) {
|
|
w.WriteU32LE(tx.Nonce)
|
|
}
|