From 0bb8950f890af25e12541c3fcf79512db180a944 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 16 Sep 2019 16:11:01 +0300 Subject: [PATCH] make TXer and Payload implement Serializable Both are duplicating Serializable at the moment, but let's keep them for the future. --- pkg/core/transaction/txer.go | 3 +-- pkg/network/payload/payload.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/core/transaction/txer.go b/pkg/core/transaction/txer.go index 62558143b..ca612c7fa 100644 --- a/pkg/core/transaction/txer.go +++ b/pkg/core/transaction/txer.go @@ -5,6 +5,5 @@ import "github.com/CityOfZion/neo-go/pkg/io" // TXer is interface that can act as the underlying data of // a transaction. type TXer interface { - DecodeBinary(*io.BinReader) error - EncodeBinary(*io.BinWriter) error + io.Serializable } diff --git a/pkg/network/payload/payload.go b/pkg/network/payload/payload.go index 870b9972a..72587cef6 100644 --- a/pkg/network/payload/payload.go +++ b/pkg/network/payload/payload.go @@ -4,8 +4,7 @@ import "github.com/CityOfZion/neo-go/pkg/io" // Payload is anything that can be binary encoded/decoded. type Payload interface { - EncodeBinary(*io.BinWriter) error - DecodeBinary(*io.BinReader) error + io.Serializable } // NullPayload is a dummy payload with no fields.