mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-30 09:33:36 +00:00
d1a4e43c48
Further simplifies error handling.
21 lines
448 B
Go
21 lines
448 B
Go
package transaction
|
|
|
|
import (
|
|
"github.com/CityOfZion/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) {
|
|
r.ReadLE(&tx.Nonce)
|
|
}
|
|
|
|
// EncodeBinary implements Serializable interface.
|
|
func (tx *MinerTX) EncodeBinary(w *io.BinWriter) {
|
|
w.WriteLE(tx.Nonce)
|
|
}
|