mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-12 21:10:36 +00:00
f1856bfa8b
It makes very little sense having pointers here, these structures MUST have some kind of key and this key is not gonna be wandering somewhere on its own. Fixes a part of #519.
26 lines
872 B
Go
26 lines
872 B
Go
package transaction
|
|
|
|
import (
|
|
"github.com/CityOfZion/neo-go/pkg/crypto/keys"
|
|
"github.com/CityOfZion/neo-go/pkg/io"
|
|
)
|
|
|
|
// EnrollmentTX transaction represents an enrollment form, which indicates
|
|
// that the sponsor of the transaction would like to sign up as a validator.
|
|
// The way to sign up is: To construct an EnrollmentTransaction type of transaction,
|
|
// and send a deposit to the address of the PublicKey.
|
|
// The way to cancel the registration is: Spend the deposit on the address of the PublicKey.
|
|
type EnrollmentTX struct {
|
|
// PublicKey of the validator.
|
|
PublicKey keys.PublicKey
|
|
}
|
|
|
|
// DecodeBinary implements Serializable interface.
|
|
func (tx *EnrollmentTX) DecodeBinary(r *io.BinReader) {
|
|
tx.PublicKey.DecodeBinary(r)
|
|
}
|
|
|
|
// EncodeBinary implements Serializable interface.
|
|
func (tx *EnrollmentTX) EncodeBinary(w *io.BinWriter) {
|
|
tx.PublicKey.EncodeBinary(w)
|
|
}
|