(self, settings, blkindex, blkmap)
| 91 | |
| 92 | class BlockDataCopier: |
| 93 | def __init__(self, settings, blkindex, blkmap): |
| 94 | self.settings = settings |
| 95 | self.blkindex = blkindex |
| 96 | self.blkmap = blkmap |
| 97 | |
| 98 | # Get first occurring block file id - for pruned nodes this |
| 99 | # will not necessarily be 0 |
| 100 | self.inFn = getFirstBlockFileId(self.settings['input']) |
| 101 | self.inF = None |
| 102 | self.outFn = 0 |
| 103 | self.outsz = 0 |
| 104 | self.outF = None |
| 105 | self.outFname = None |
| 106 | self.blkCountIn = 0 |
| 107 | self.blkCountOut = 0 |
| 108 | self.xor_key = read_xor_key(self.settings['input']) |
| 109 | |
| 110 | self.lastDate = datetime.datetime(2000, 1, 1) |
| 111 | self.highTS = 1408893517 - 315360000 |
| 112 | self.timestampSplit = False |
| 113 | self.fileOutput = True |
| 114 | self.setFileTime = False |
| 115 | self.maxOutSz = settings['max_out_sz'] |
| 116 | if 'output' in settings: |
| 117 | self.fileOutput = False |
| 118 | if settings['file_timestamp'] != 0: |
| 119 | self.setFileTime = True |
| 120 | if settings['split_timestamp'] != 0: |
| 121 | self.timestampSplit = True |
| 122 | # Extents and cache for out-of-order blocks |
| 123 | self.blockExtents = {} |
| 124 | self.outOfOrderData = {} |
| 125 | self.outOfOrderSize = 0 # running total size for items in outOfOrderData |
| 126 | |
| 127 | def read_xored(self, f, size): |
| 128 | offset = f.tell() |
nothing calls this directly
no test coverage detected