-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: pull libbitcoin_server code out of wallet code 3/N #5743
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
Conversation
71292ec to
3f77c9d
Compare
3f77c9d to
c234a00
Compare
|
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 206ff59f54..81ac0b7edb 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -5517,7 +5517,7 @@ bool CWallet::GenerateNewHDChainEncrypted(const SecureString& secureMnemonic, co
bool CWallet::ShutdownRequested()
{
- return chain().shutdownRequested();
+ return HaveChain() && chain().shutdownRequested();
}
void CWallet::UpdateProgress(const std::string& title, int nProgress) |
c234a00 to
a2ca4a1
Compare
UdjinM6
left a comment
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.
LGTM, light ACK 👍
|
This pull request has conflicts, please rebase. |
a2ca4a1 to
845d5d5
Compare
UdjinM6
left a comment
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.
re-utACK
|
ping @PastaPastaPasta |
src/wallet/wallet.h
Outdated
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.
it'd be nice to use string_view here but I think ShowProgress probably wants a std::string
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.
yes, ShowProgress indeed uses std::string even in the latest version of bitcoin core:
boost::signals2::signal<void (const std::string &title, int nProgress)> ShowProgress;
The strMsg that is used in scriptpubkeyman.cpp is also std::string, so, using string_view will add a new allocation here, I will keep it as it is.
src/interfaces/chain.h
Outdated
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.
please rework this comment; doesn't make sense
src/wallet/wallet.cpp
Outdated
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.
refactor to use std::all_of, std::any_of or std::none_of ?
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.
that's not new code, I just moved a function to a new place. Anyway, I provided a refactoring in an extra commit
845d5d5 to
2e0bd50
Compare
UdjinM6
left a comment
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.
re-utACK
PastaPastaPasta
left a comment
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.
utACK for merging via merge commit
…global variable in wallet's code
2e0bd50 to
e3d9327
Compare
Issue being fixed or feature implemented
Wallet library should not depends on server code (libbitcoin_server).
Untie this library will help to finish backport bitcoin#15639 and will unblock multiprocess: bitcoin#18677
Prior work:
What was done?
havePrunedfrom interface instead directfPruneuiInterfacefShutdownfrom scriptpubkeymanllmq::quorumInstantSendManager/llmq::chainLocksHandlerare wrapper in interfacedeterministicMNManagerfrom wallet codeHow Has This Been Tested?
Amount of linkage errors is decreased from 196 to 141 if
libbitcoin_serveris excluded during linkage:Breaking Changes
N/A
Checklist: