Bytes encodes a TransactionType to a byte slice.
()
| 35 | |
| 36 | // Bytes encodes a TransactionType to a byte slice. |
| 37 | func (t TransactionType) Bytes() (b []byte) { |
| 38 | b = make([]byte, 4) |
| 39 | binary.BigEndian.PutUint32(b, uint32(t)) |
| 40 | return |
| 41 | } |
| 42 | |
| 43 | // FromBytes decodes a TransactionType from a byte slice. |
| 44 | func FromBytes(b []byte) TransactionType { |
no outgoing calls