Convert a little-endian hex string to bytes Lets you write uint256's and uint160's the way the Satoshi codebase shows them.
(h)
| 42 | return binascii.hexlify(b).decode('utf8') |
| 43 | |
| 44 | def lx(h): |
| 45 | """Convert a little-endian hex string to bytes |
| 46 | |
| 47 | Lets you write uint256's and uint160's the way the Satoshi codebase shows |
| 48 | them. |
| 49 | """ |
| 50 | return binascii.unhexlify(h.encode('utf8'))[::-1] |
| 51 | |
| 52 | def b2lx(b): |
| 53 | """Convert bytes to a little-endian hex string |
no outgoing calls