(settings)
| 73 | |
| 74 | # When getting the list of block hashes, undo any byte reversals. |
| 75 | def get_block_hashes(settings): |
| 76 | blkindex = [] |
| 77 | f = open(settings['hashlist'], "r", encoding="utf8") |
| 78 | for line in f: |
| 79 | line = line.rstrip() |
| 80 | if settings['rev_hash_bytes'] == 'true': |
| 81 | line = hex_switchEndian(line) |
| 82 | blkindex.append(line) |
| 83 | |
| 84 | print("Read " + str(len(blkindex)) + " hashes") |
| 85 | |
| 86 | return blkindex |
| 87 | |
| 88 | # The block map shouldn't give or receive byte-reversed hashes. |
| 89 | def mkblockmap(blkindex): |
no test coverage detected