add mnemonicinfo, importmasterkey#37
Conversation
cce4a8f to
78b9924
Compare
|
This is done and up for review now! Tests are complete. I was facing the following issue: I had put lib uninorm (for utf8/unicode) and the mnemonic.cpp into Another thing which bugs me: Although we're pretty sure that |
|
I should note the following thing: I am trying to use as much bitcoin functionality as possible. Bitcoins I'll create a ticket for this. I could imagine that we might want to detect a newly created wallet and just prohibit overwriting the masterkey for a wallet that is already in use. edit: Issue: #40 |
a70e6b0 to
f33d3d5
Compare
| int m_deepestTxnDepth = 0; // for stake mining | ||
|
|
||
| int m_stakeLimitHeight = 0; // for regtest, don't stake above nStakeLimitHeight | ||
| int m_stakeLimitHeight = |
There was a problem hiding this comment.
maybe we can put the comment in the line above and thus prevent the new line with a 0;
| @@ -0,0 +1,163 @@ | |||
| // Copyright (c) 2010 Satoshi Nakamoto | |||
There was a problem hiding this comment.
I am confused, didn't we take this from particl? cause it seems here it was taken from bitcoin.
There was a problem hiding this comment.
Copy'n'paste abfuck from my side... I merely duplicated rpcwallet and got rid of it's guts. Changing!
There was a problem hiding this comment.
In addition: I'd like to point out that the code in rpcmnemonic we did not take form particl at all, it sets a master key in the existing CWallet, doing a lot less voodoo then the CHDWallet form particl.
| LOCK(wallet->cs_wallet); | ||
| const std::string walletFileName = wallet->GetName(); | ||
| std::string mnemonic = ""; | ||
| if (request.params.size() > 0) { |
There was a problem hiding this comment.
This check seems to be redundant as the size of the request.params is checked at the beginning of the function.
| @@ -0,0 +1,67 @@ | |||
| #!/usr/bin/env python3 | |||
| # Copyright (c) 2016-2017 The Bitcoin Core developers | |||
| @@ -0,0 +1,185 @@ | |||
| #!/usr/bin/env python3 | |||
| # Copyright (c) 2016-2017 The Bitcoin Core developers | |||
There was a problem hiding this comment.
These tests are our very own.
|
@Nizametdinov about The distinction between these commands was not ported. All keys are derived along a chain, i.e. The bitcoin codebase we're forking form already has support for these internal/external chain splits ( For the desktop application: use |
|
@Gnappuraz I checked the copyright headers one by one again. All the copyright for ShadowCoin/BlackCoin were correct. I added the headers for particl copyright as it was indeed missing from most files in Our own copyright we add before we release with a script. The script already exists and does not add if the copyright notice is already there and does add if it's not there yet. |
This is the
importmasterkeyandmnemonicinfoRPCs. Tests will follow shortly, do not merge yet ;-) but you can start reviewing.The unit-e
importmasterkeyis namedextkeyimportmasterin particl (but I chose not to refer to it as an ext key; the extended keys are technically the the derived keys in the HD structure which also reflect the path (m' / 44 / ...).mnemonicinfois like a dry run and I am using it to test the mnemonic functionality for conformance with BIP32 and BIP39.