heightToKey converts a height in int32 to a key in bytes.
(h int32)
| 74 | |
| 75 | // heightToKey converts a height in int32 to a key in bytes. |
| 76 | func heightToKey(h int32) (key []byte) { |
| 77 | key = make([]byte, 4) |
| 78 | binary.BigEndian.PutUint32(key, uint32(h)) |
| 79 | return |
| 80 | } |
| 81 | |
| 82 | // keyWithSymbolToHeight converts a height back from a key(ack/resp/req/block) in bytes. |
| 83 | // ack key: |