-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wallet API: add support for wallet creation from hardware device #3921
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why keeping an indirection for parse_subaddress_lookahead ?
@cslashm |
src/wallet/api/wallet_manager.cpp
Outdated
auto lookahead = tools::parse_subaddress_lookahead(subaddressLookahead); | ||
if (!lookahead) | ||
{ | ||
lookahead = tools::parse_subaddress_lookahead("5:20"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe std::make_pair(5,20) ?
src/wallet/api/wallet_manager.cpp
Outdated
{ | ||
lookahead = tools::parse_subaddress_lookahead("5:20"); | ||
} | ||
wallet->setSubaddressLookahead(lookahead->first, lookahead->second); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though with this, i'll override the wallet2 settings even when not specified. The defaults should be in wallet2 so other programs benefit from a good value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, please see the first commit.
src/wallet/wallet2.cpp
Outdated
@@ -3269,6 +3269,12 @@ void wallet2::restore(const std::string& wallet_, const epee::wipeable_string& p | |||
cryptonote::block b; | |||
generate_genesis(b); | |||
m_blockchain.push_back(get_block_hash(b)); | |||
if (m_subaddress_lookahead_major == SUBADDRESS_LOOKAHEAD_MAJOR && m_subaddress_lookahead_major == SUBADDRESS_LOOKAHEAD_MINOR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second major should be minor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch :P
fb1105d
to
2253b0f
Compare
@stoffu please rebase. |
Rebased |
CC: @cslashm