Skip to content

Conversation

PastaPastaPasta
Copy link
Member

@PastaPastaPasta PastaPastaPasta commented Apr 14, 2020

This is a dependency for bitcoin#10740 which I am planning on backporting into 0.16 as it seems to be one of the more requested features

@PastaPastaPasta
Copy link
Member Author

rebased on develop

laanwj and others added 9 commits April 15, 2020 21:04
c7ec524 [wallet] Add dummy wallet init class (John Newbery)
49baa4a [wallet] Use global g_wallet_init_interface to init/destroy the wallet. (John Newbery)
caaf972 [wallet] Create wallet init interface. (John Newbery)
5fb5421 [wallet] Move wallet init functions into WalletInit class. (John Newbery)

Pull request description:

  This continues the work of bitcoin#7965. This PR, along with several others, would remove the remaining dependencies from libbitcoin_server.a on libbitcoin_wallet.a.

  To create the interface, I've just translated all the old init.cpp wallet function calls into an interface class. I've not done any thinking about whether it makes sense to change that interface by combining/splitting those calls. This is a purely internal interface, so there's no problem in changing it later.

Tree-SHA512: 32ea57615229c33fd1a7f2f29ebc11bf30337685f7211baffa899823ef74b65dcbf068289c557a161c5afffb51fdc38a2ee8180720371f64d433b12b0615cf3f
Signed-off-by: Pasta <pasta@dashboost.org>

# Conflicts:
#	src/dashd.cpp
#	src/init.cpp
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed changes:

  • Should backup wallets before trying to verify them. This is because -salvagewallet is very dangerous and can actually corrupt wallets making them irreparably broken.
  • No reason to make schedulePrivateSendClientMaintenance a part of the wallet (interface) because privateSendClient is a global object not tied to the wallet directly atm.
  • Should not run client-side mixing on masternodes.
  • Fix InitAutoBackup signature in DummyWalletInit.

Pls see 823eac5

Changes:
- Should backup wallets before trying to verify them. This is because `-salvagewallet` is very dangerous and can actually corrupt wallets making them irreparably broken.
- No reason to make `schedulePrivateSendClientMaintenance` a part of the wallet (interface) because `privateSendClient` is a global object not tied to the wallet directly atm.
- Should not run client-side mixing on masternodes.
- Fix `InitAutoBackup` signature in `DummyWalletInit`.
@PastaPastaPasta PastaPastaPasta requested a review from UdjinM6 April 16, 2020 15:37
@PastaPastaPasta
Copy link
Member Author

PastaPastaPasta commented Apr 16, 2020

Done, left two comments on your commit, tests pass

@UdjinM6 UdjinM6 added this to the 16 milestone Apr 16, 2020
UdjinM6
UdjinM6 previously approved these changes Apr 16, 2020
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slightly tested ACK

Signed-off-by: pasta <pasta@dashboost.org>
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slightly tested ACK

@UdjinM6 UdjinM6 merged commit 97742a1 into dashpay:develop Apr 18, 2020
@PastaPastaPasta PastaPastaPasta deleted the backport-10762 branch April 18, 2020 16:17
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Feb 14, 2022
dashpay#3412)

* Merge bitcoin#10762: [wallet] Remove Wallet dependencies from init.cpp

c7ec524 [wallet] Add dummy wallet init class (John Newbery)
49baa4a [wallet] Use global g_wallet_init_interface to init/destroy the wallet. (John Newbery)
caaf972 [wallet] Create wallet init interface. (John Newbery)
5fb5421 [wallet] Move wallet init functions into WalletInit class. (John Newbery)

Pull request description:

  This continues the work of bitcoin#7965. This PR, along with several others, would remove the remaining dependencies from libbitcoin_server.a on libbitcoin_wallet.a.

  To create the interface, I've just translated all the old init.cpp wallet function calls into an interface class. I've not done any thinking about whether it makes sense to change that interface by combining/splitting those calls. This is a purely internal interface, so there's no problem in changing it later.

Tree-SHA512: 32ea57615229c33fd1a7f2f29ebc11bf30337685f7211baffa899823ef74b65dcbf068289c557a161c5afffb51fdc38a2ee8180720371f64d433b12b0615cf3f
Signed-off-by: Pasta <pasta@dashboost.org>

* a couple of fixes

Signed-off-by: Pasta <pasta@dashboost.org>

* move privatesend launch options help into wallet/init.cpp

Signed-off-by: Pasta <pasta@dashboost.org>

* remove ENABLE_WALLET for AutoLockMasternodeCollaterals

Signed-off-by: Pasta <pasta@dashboost.org>

* move a wallet param interaction into wallet/init.cpp

Signed-off-by: Pasta <pasta@dashboost.org>

* move PrivateSend init to wallet/init.h

Signed-off-by: Pasta <pasta@dashboost.org>

* move privatesend scheduler into wallet.cpp

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unneeded import

Signed-off-by: Pasta <pasta@dashboost.org>

* move KeePass init and InitAutoBackup into wallet/init.cpp

Signed-off-by: Pasta <pasta@dashboost.org>

* Fix 10762

Changes:
- Should backup wallets before trying to verify them. This is because `-salvagewallet` is very dangerous and can actually corrupt wallets making them irreparably broken.
- No reason to make `schedulePrivateSendClientMaintenance` a part of the wallet (interface) because `privateSendClient` is a global object not tied to the wallet directly atm.
- Should not run client-side mixing on masternodes.
- Fix `InitAutoBackup` signature in `DummyWalletInit`.

* remove boost dependancy in wallet/init.cpp

Signed-off-by: pasta <pasta@dashboost.org>

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants