]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction.go
patch: v0.0.12
[rbdr/mobius] / hotline / transaction.go
index 8fbdf35c0d652a71076c13fe776a625439c59c5c..835d194b24e5c445bcc741013c8e1f587125ab32 100644 (file)
@@ -214,7 +214,7 @@ func ReadFields(paramCount []byte, buf []byte) ([]Field, error) {
        return fields, nil
 }
 
        return fields, nil
 }
 
-func (t Transaction) Payload() []byte {
+func (t Transaction) MarshalBinary() (data []byte, err error) {
        payloadSize := t.Size()
 
        fieldCount := make([]byte, 2)
        payloadSize := t.Size()
 
        fieldCount := make([]byte, 2)
@@ -234,7 +234,7 @@ func (t Transaction) Payload() []byte {
                payloadSize, // this is the dataSize field, but seeming the same as totalSize
                fieldCount,
                fieldPayload,
                payloadSize, // this is the dataSize field, but seeming the same as totalSize
                fieldCount,
                fieldPayload,
-       )
+       ), err
 }
 
 // Size returns the total size of the transaction payload
 }
 
 // Size returns the total size of the transaction payload