neoneo-go/pkg/core/transaction/contract.go
Roman Khimov 683424cce8 transaction: implement proper Size() everywhere
Will be needed for the block test from `dev`.
2019-08-30 11:41:10 +03:00

29 lines
528 B
Go

package transaction
import (
"io"
)
// ContractTX represents a contract transaction.
// This TX has not special attributes.
type ContractTX struct{}
func NewContractTX() *Transaction {
return &Transaction{
Type: ContractType,
}
}
// DecodeBinary implements the Payload interface.
func (tx *ContractTX) DecodeBinary(r io.Reader) error {
return nil
}
// EncodeBinary implements the Payload interface.
func (tx *ContractTX) EncodeBinary(w io.Writer) error {
return nil
}
func (tx *ContractTX) Size() int {
return 0
}