(cls, filename)
| 63 | |
| 64 | @classmethod |
| 65 | def dump_cache(cls, filename): |
| 66 | with open(filename, 'w') as f: |
| 67 | to_dump = {k: tx.serialize().hex() for k, tx in cls.cache.items()} |
| 68 | s = json.dumps(to_dump, sort_keys=True, indent=4) |
| 69 | f.write(s) |
| 70 | |
| 71 | |
| 72 | class Tx: |