Skip to content

Conversation

@jonasschnelli
Copy link
Contributor

This looks after a heavy changeset, but it's not. This will only move wallet related files to /src/wallet/.
The PR includes no code changes.

Could once be renamed from /src/wallet to /src/legacywallet.

@TheBlueMatt
Copy link
Contributor

You forgot to git add the new directory, it looks like.

@jonasschnelli jonasschnelli force-pushed the 2015/02/legacywallet_modularization branch from dd95b20 to 56e7e6b Compare February 3, 2015 20:44
@jonasschnelli
Copy link
Contributor Author

@TheBlueMatt Bah. Now added. Thanks.

@jonasschnelli jonasschnelli force-pushed the 2015/02/legacywallet_modularization branch 2 times, most recently from 1a94305 to b20f2a6 Compare February 4, 2015 08:04
@laanwj
Copy link
Member

laanwj commented Feb 4, 2015

ACK (but needs rebase)

@jonasschnelli jonasschnelli force-pushed the 2015/02/legacywallet_modularization branch 2 times, most recently from 70cd06e to c708012 Compare February 4, 2015 12:07
@jonasschnelli
Copy link
Contributor Author

Rebased.

jonasschnelli added a commit to jonasschnelli/bitcoin that referenced this pull request Feb 4, 2015
According to bitcoin#3440 it would make sense to decouple the wallet and the miner (and maybe other things) from the init-/shutdown-process, etc.

This is related to bitcoin#5686, bitcoin#5744, bitcoin#5745
@theuni
Copy link
Member

theuni commented Feb 5, 2015

Since there's a reasonably clean separation of the wallet files, I'd prefer to build the objects in the subdir, same as qt and tests:

diff --git a/src/Makefile.am b/src/Makefile.am
index 88e7af2..1ff3180 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,7 @@ BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPP
 BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include

 LIBBITCOIN_SERVER=libbitcoin_server.a
-LIBBITCOIN_WALLET=libbitcoin_wallet.a
+LIBBITCOIN_WALLET=wallet/libbitcoin_wallet.a
 LIBBITCOIN_COMMON=libbitcoin_common.a
 LIBBITCOIN_CLI=libbitcoin_cli.a
 LIBBITCOIN_UTIL=libbitcoin_util.a
@@ -46,7 +46,7 @@ EXTRA_LIBRARIES = \
   libbitcoin_cli.a
 if ENABLE_WALLET
 BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
-EXTRA_LIBRARIES += libbitcoin_wallet.a
+EXTRA_LIBRARIES += $(LIBBITCOIN_WALLET)
 endif

 if BUILD_BITCOIN_LIBS
@@ -191,8 +191,8 @@ libbitcoin_server_a_SOURCES = \

 # wallet: shared between bitcoind and bitcoin-qt, but only linked
 # when wallet enabled
-libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
-libbitcoin_wallet_a_SOURCES = \
+wallet_libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
+wallet_libbitcoin_wallet_a_SOURCES = \
   wallet/db.cpp \
   crypter.cpp \
   wallet/rpcdump.cpp \
@@ -310,7 +310,7 @@ bitcoind_LDADD = \
   $(LIBSECP256K1)

 if ENABLE_WALLET
-bitcoind_LDADD += libbitcoin_wallet.a
+bitcoind_LDADD += $(LIBBITCOIN_WALLET)
 endif

 bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 31fe3a9..7b48b41 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -370,7 +370,7 @@ QT_QM=$(QT_TS:.ts=.qm)

 SECONDARY: $(QT_QM)

-qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES)
+qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(wallet_libbitcoin_wallet_a_SOURCES)
    @test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
    $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) ../share/qt/extract_strings_qt.py $^

That'd be my preference since imo it's cleaner, but I'm not strongly opposed to leaving it as-is.

ACK either way.

@jonasschnelli
Copy link
Contributor Author

@theuni Yes. I think this should be the long term goal. Let me play with it.
What about the wallet tests under src/wallet/test? I assume we keep these in the src/Makefile.test.include for now?
The problem is, that currently other tests relay on a wallet. I try to slowly also decouple things there.

@theuni
Copy link
Member

theuni commented Feb 5, 2015

@jonasschnelli sure, no problem if things slowly move that way, no need to try to do it all at once. Yes, tests are fine as you handled them imo. Eventually we can create a Makefile.wallet.include once it's more decoupled.

@jtimon
Copy link
Contributor

jtimon commented Feb 6, 2015

ut ACK

@jonasschnelli jonasschnelli force-pushed the 2015/02/legacywallet_modularization branch from c708012 to aa9ea5f Compare March 5, 2015 08:16
@jonasschnelli
Copy link
Contributor Author

Rebased.

What if we merge this (has ACK from @theuni and @laanwj)? This requires rebase often when getting out of date.
The makefile changes (#5745 (comment)) could be done in a upcoming PR.

@paveljanik
Copy link
Contributor

utACK

1 similar comment
@fanquake
Copy link
Member

fanquake commented Mar 5, 2015

utACK

could once be renamed from /src/wallet to /src/legacywallet.
@jonasschnelli jonasschnelli force-pushed the 2015/02/legacywallet_modularization branch from aa9ea5f to 50c72f2 Compare March 12, 2015 13:13
@jonasschnelli
Copy link
Contributor Author

Rebased and ready for merge. :)

@laanwj laanwj merged commit 50c72f2 into bitcoin:master Mar 20, 2015
laanwj added a commit that referenced this pull request Mar 20, 2015
50c72f2 [Move Only] Move wallet related things to src/wallet/ (Jonas Schnelli)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants