Update Linearize tool to support Windows paths; fix variable scope; update README and example configuration#6372
Merged
laanwj merged 1 commit intobitcoin:masterfrom Jul 17, 2015
veqtrus:linearize_win
Merged
Update Linearize tool to support Windows paths; fix variable scope; update README and example configuration#6372laanwj merged 1 commit intobitcoin:masterfrom veqtrus:linearize_win
laanwj merged 1 commit intobitcoin:masterfrom
veqtrus:linearize_win
Conversation
Contributor
|
seems reasonable |
Member
|
Python has excellent path manipulation utilities. Instead of making the path character configurable, why not use Python's |
Contributor
|
slightly tested ACK (not on windows). |
contrib/linearize/linearize-data.py
Outdated
Member
There was a problem hiding this comment.
I'm not sure making inLen an instance variable is the right solution to the problem.
Only one function outside run(), writeBlock(), uses self.inLen, which is never defined, but the on-disk size can be easily computed in the function itself with:
def writeBlock(self, inhdr, blk_hdr, rawblock):
blockSizeOnDisk = len(inhdr) + len(blk_hdr) + len(rawblock)
if not self.fileOutput and ((self.outsz + blockSizeOnDisk) > self.maxOutSz):
Member
|
ACK after squashing commits into one |
laanwj
added a commit
that referenced
this pull request
Jul 17, 2015
e3c4297 Update Linearize tool to support Windows paths (Paul Georgiou)
zkbot
added a commit
to zcash/zcash
that referenced
this pull request
Mar 3, 2017
Bitcoin 0.12 misc PRs 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6198 - bitcoin/bitcoin#6206 - bitcoin/bitcoin#5927 - bitcoin/bitcoin#6213 - bitcoin/bitcoin#6061 - bitcoin/bitcoin#6283 (partial, remainder was pulled in #929) - bitcoin/bitcoin#6272 - bitcoin/bitcoin#6316 - bitcoin/bitcoin#6133 - bitcoin/bitcoin#6387 - bitcoin/bitcoin#6401 - bitcoin/bitcoin#6434 - bitcoin/bitcoin#6372 - bitcoin/bitcoin#6447 - bitcoin/bitcoin#6149 - bitcoin/bitcoin#6468 Part of #2074.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows uses backslashes () in paths. An option has been added to allow setting which type of slash to be used. By default the forward slash (/) is used. Also updated the example configuration with the respective option.
I added 'self.' in front of a few variables since without it the script didn't work for me.
Minor fixes for README.