Bytes converts Uint256 to []byte.
()
| 58 | |
| 59 | // Bytes converts Uint256 to []byte. |
| 60 | func (i *Uint256) Bytes() []byte { |
| 61 | var binBuf bytes.Buffer |
| 62 | binary.Write(&binBuf, binary.BigEndian, i) |
| 63 | return binBuf.Bytes() |
| 64 | } |
| 65 | |
| 66 | // MarshalHash marshals for hash. |
| 67 | func (i *Uint256) MarshalHash() (o []byte, err error) { |