Add CL flag support to sidechain manipulation script#60
Add CL flag support to sidechain manipulation script#60gwillen merged 1 commit intoElementsProject:alphafrom
Conversation
droark
commented
Nov 9, 2015
- Add support for command line arguments to the sidechain manipulation script. argparse requires Python 2.7 or 3.2+.
- Add support for unlocking mainchain wallet when running send-to-sidechain.
- Add various bits of help text, some of which may not be quite right.
|
This is a more thorough (and tested) replacement for PR #44. I ended up replacing the sys.argv usage with argparse. This way, the code adds a more useful help system alongside efficient argument parsing. The one and only time that CL flags are used right now are to unlock Bitcoin wallets when using send-to-sidechain. I discovered that the code, when Armory is running, will use a locked Armory wallet. That's how I tested this. Note that HEAD won't work due to libsecp256k1 API breakage. See issue #59 for details regarding where to rewind libsecp256k1 & contracthashtool in order to test this patch. Thanks. |
|
Paging @gwillen. Am I on the right path? Did I go too far with the changes? |
|
No way, you didn't go too far at all, this is awesome. Let me test it out and then figure out what the process is for us to merge it. Thanks! |
|
Thanks, and sorry about the extra commits that just popped up! I added a commit and tried to squash it. My squash mojo just isn't right today, unfortunately. I'll clean it up one way or another. |
|
No problem. I think what you want is 'git rebase -i foo' -- starting with the branch whose tip you want to squash checked out -- where foo is the parent of the first commit you want to squash; then replace 'pick' with 'squash' on all lines but the first: http://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git And then 'git push -f [something appropriate]' to update the pullreq. (Which will nuke all inline comments on the previous commits unfortunately, but in this case there aren't any.) |
|
Thanks! That did the trick. I had basically done that. I didn't force the initial push, though, so something went sideways. Oh well. All's well now. |
|
Other than the comment above about the behavior in case of failure -- which I think should emulate the old behavior as much as possible if the issue is not a locked wallet -- I think this is ready to be merged. |
|
Oh no, it's totally fine! I'm happy to make any and all changes as needed. I'll look at everything and update in a little bit. |
|
@gwillen - I believe I've addressed your feedback. Forgot to run a sanity check but I'll do that right now. Anything else you'd like for me to do? Should I squash the new commit? EDIT: Sanity check was fine. |
|
Looks good, thanks! Go ahead and squash now that I've looked at it. EDIT: And I've figured out the process so I am ready to merge this once you squash it. |
- Add support for command line arguments to the sidechain manipulation script. argparse requires Python 2.7 or 3.2+. - Add support for unlocking mainchain wallet when running send-to-sidechain. - Add various bits of help text, some of which may not be quite right.
|
squash |
505a6d1 Add CL arg support to sidechain manipulation script (Douglas Roark)
|
Ok, after a bit of a battle with the commit-signing script, it is done! Thanks for your patience and thanks for your contribution! |
|
Thanks! I'll keep an eye out for any more contributions I can make. |
FundTransaction: better estimate final tx size
…d enum 0e5dedb qt/wallettests: sort includes (William Casarin) 0554251 qt: Skip displayUnitChanged signal if unit is not actually changed (Hennadii Stepanov) ffbc2fe qt, refactor: Remove default cases for scoped enum (Hennadii Stepanov) 152d5ba qt, refactor: Remove BitcoinUnits::valid function (Hennadii Stepanov) aa23960 qt, refactor: Make BitcoinUnits::Unit a scoped enum (Hennadii Stepanov) 75832fd qt: Use QVariant instead of int for BitcoinUnit in QSettings (Hennadii Stepanov) Pull request description: This is a rebased version of ElementsProject#60 Since Qt 5.5 there are [means](https://doc.qt.io/qt-5/qobject.html#Q_ENUM) to register an enum type with the meta-object system (such enum still lacks an ability to interact with [QSettings::setValue()](https://doc.qt.io/qt-5/qsettings.html#setValue) and [QSettings::value()](https://doc.qt.io/qt-5/qsettings.html#value) without defined stream operators). In order to reduce global namespace polluting and to force strong type checking, this PR makes BitcoinUnits::Unit a scoped enum (typedef BitcoinUnits::Unit BitcoinUnit;). No behavior change. ACKs for top commit: jonatack: ACK 0e5dedb, review and debug build of each commit after rebase on current master, lightly tested running the GUI, changing units a few times, and verifying persistence after restarting promag: Code review ACK 0e5dedb Tree-SHA512: 39ec0d7e4f0b9b25be287888121a8db6b282339674e37ec3a3554da63a9e22d6fe079e8310ca289b2a0356a19b3c7e55afa17d09dd34e0f222177f603bb053a3