Skip to content

Commit 13188e1

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge bitcoin#19331: build: Do not include server symbols in wallet
faca730 ci: Install fixed version of clang-format for linters (MarcoFalke) fa4695d build: Sort Makefile.am after renaming file (MarcoFalke) cccc278 scripted-diff: Move ui_interface to the node lib (MarcoFalke) fa72ca6 qt: Remove unused includes (MarcoFalke) fac96e6 wallet: Do not include server symbols (MarcoFalke) fa0f6c5 Revert "Fix link error with --enable-debug" (MarcoFalke) Pull request description: This reverts a hacky workaround from commit b83cc0f, which only happens to work due to compiler optimizations. Then, it actually fixes the linker error. The underlying problem is that the wallet includes symbols from the server (ui_interface), which usually results in linker failures. Though, in this specific case the linker failures have not been observed (unless `-O0`) because our compilers were smart enough to strip unused symbols. Fix the underlying problem by creating a new header-only with the needed symbol and move ui_interface to node to clarify that this is part of libbitcoin_server. ACKs for top commit: Sjors: ACK faca730 laanwj: ACK faca730 hebasto: re-ACK faca730, since the [previous](bitcoin#19331 (review)) review: Tree-SHA512: e9731f249425aaea50b6db5fc7622e10078cf006721bb87989cac190a2ff224412f6f8a7dd83efd018835302337611f5839e29e15bef366047ed591cef58dfb4
1 parent cd9af42 commit 13188e1

34 files changed

+68
-60
lines changed

ci/lint/04_install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
export LC_ALL=C
88

9+
travis_retry sudo apt update && sudo apt install -y clang-format-9
10+
sudo update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9 ) 100
11+
sudo update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(which clang-format-diff-9) 100
12+
913
travis_retry pip3 install codespell==1.17.1
1014
travis_retry pip3 install flake8==3.8.3
1115
travis_retry pip3 install vulture==2.3

src/Makefile.am

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ BITCOIN_CORE_H = \
141141
cachemap.h \
142142
cachemultimap.h \
143143
blockfilter.h \
144+
bloom.h \
144145
chain.h \
145146
chainparams.h \
146147
chainparamsbase.h \
@@ -170,6 +171,7 @@ BITCOIN_CORE_H = \
170171
cuckoocache.h \
171172
ctpl_stl.h \
172173
cxxtimer.hpp \
174+
dbwrapper.h \
173175
deploymentinfo.h \
174176
deploymentstatus.h \
175177
evo/assetlocktx.h \
@@ -217,7 +219,6 @@ BITCOIN_CORE_H = \
217219
interfaces/wallet.h \
218220
key.h \
219221
key_io.h \
220-
dbwrapper.h \
221222
limitedmap.h \
222223
llmq/blockprocessor.h \
223224
llmq/chainlocks.h \
@@ -263,6 +264,7 @@ BITCOIN_CORE_H = \
263264
node/context.h \
264265
node/psbt.h \
265266
node/transaction.h \
267+
node/ui_interface.h \
266268
node/utxo_snapshot.h \
267269
noui.h \
268270
outputtype.h \
@@ -308,13 +310,12 @@ BITCOIN_CORE_H = \
308310
support/lockedpool.h \
309311
sync.h \
310312
timestampindex.h \
311-
threadsafety.h \
312313
threadinterrupt.h \
314+
threadsafety.h \
313315
timedata.h \
314316
torcontrol.h \
315317
txdb.h \
316318
txmempool.h \
317-
ui_interface.h \
318319
undo.h \
319320
unordered_lru_cache.h \
320321
util/bip32.h \
@@ -329,8 +330,6 @@ BITCOIN_CORE_H = \
329330
util/hasher.h \
330331
util/hash_type.h \
331332
util/irange.h \
332-
util/spanparsing.h \
333-
util/system.h \
334333
util/asmap.h \
335334
util/getuniquepath.h \
336335
util/macros.h \
@@ -345,20 +344,22 @@ BITCOIN_CORE_H = \
345344
util/ranges_set.h \
346345
util/sock.h \
347346
util/string.h \
347+
util/spanparsing.h \
348+
util/system.h \
348349
util/time.h \
349350
util/thread.h \
350351
util/threadnames.h \
351352
util/trace.h \
352353
util/translation.h \
353-
util/vector.h \
354+
util/ui_change_type.h \
354355
util/url.h \
355356
util/vector.h \
356357
validation.h \
357358
validationinterface.h \
358359
versionbits.h \
359-
walletinitinterface.h \
360360
wallet/bdb.h \
361361
wallet/coincontrol.h \
362+
wallet/coinselection.h \
362363
wallet/context.h \
363364
wallet/crypter.h \
364365
wallet/db.h \
@@ -373,7 +374,7 @@ BITCOIN_CORE_H = \
373374
wallet/walletdb.h \
374375
wallet/wallettool.h \
375376
wallet/walletutil.h \
376-
wallet/coinselection.h \
377+
walletinitinterface.h \
377378
warnings.h \
378379
zmq/zmqabstractnotifier.h \
379380
zmq/zmqnotificationinterface.h \
@@ -423,6 +424,14 @@ libbitcoin_server_a_SOURCES = \
423424
evo/specialtx.cpp \
424425
evo/specialtxman.cpp \
425426
flatfile.cpp \
427+
governance/classes.cpp \
428+
governance/exceptions.cpp \
429+
governance/governance.cpp \
430+
governance/object.cpp \
431+
governance/validators.cpp \
432+
governance/vote.cpp \
433+
governance/votedb.cpp \
434+
gsl/assert.cpp \
426435
httprpc.cpp \
427436
httpserver.cpp \
428437
i2p.cpp \
@@ -431,14 +440,6 @@ libbitcoin_server_a_SOURCES = \
431440
index/coinstatsindex.cpp \
432441
index/txindex.cpp \
433442
init.cpp \
434-
governance/governance.cpp \
435-
governance/classes.cpp \
436-
governance/exceptions.cpp \
437-
governance/object.cpp \
438-
governance/validators.cpp \
439-
governance/vote.cpp \
440-
governance/votedb.cpp \
441-
gsl/assert.cpp \
442443
llmq/quorums.cpp \
443444
llmq/blockprocessor.cpp \
444445
llmq/commitment.cpp \
@@ -472,6 +473,7 @@ libbitcoin_server_a_SOURCES = \
472473
node/interfaces.cpp \
473474
node/psbt.cpp \
474475
node/transaction.cpp \
476+
node/ui_interface.cpp \
475477
noui.cpp \
476478
policy/fees.cpp \
477479
policy/policy.cpp \
@@ -497,7 +499,6 @@ libbitcoin_server_a_SOURCES = \
497499
torcontrol.cpp \
498500
txdb.cpp \
499501
txmempool.cpp \
500-
ui_interface.cpp \
501502
validation.cpp \
502503
validationinterface.cpp \
503504
versionbits.cpp \

src/banman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <banman.h>
77

88
#include <netaddress.h>
9-
#include <ui_interface.h>
9+
#include <node/ui_interface.h>
1010
#include <util/system.h>
1111
#include <util/time.h>
1212
#include <util/translation.h>

src/bitcoind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include <init.h>
1515
#include <interfaces/chain.h>
1616
#include <node/context.h>
17+
#include <node/ui_interface.h>
1718
#include <noui.h>
1819
#include <shutdown.h>
19-
#include <ui_interface.h>
2020
#include <util/check.h>
2121
#include <util/system.h>
2222
#include <util/strencodings.h>

src/evo/deterministicmns.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <consensus/validation.h>
1616
#include <deploymentstatus.h>
1717
#include <script/standard.h>
18-
#include <ui_interface.h>
1918
#include <validation.h>
2019
#include <validationinterface.h>
2120
#include <univalue.h>

src/httpserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
#include <chainparamsbase.h>
88
#include <netbase.h>
9+
#include <node/ui_interface.h>
910
#include <rpc/protocol.h> // For HTTP status codes
1011
#include <shutdown.h>
1112
#include <sync.h>
12-
#include <ui_interface.h>
1313
#include <util/strencodings.h>
1414
#include <util/system.h>
1515
#include <util/threadnames.h>

src/index/base.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#include <chainparams.h>
66
#include <index/base.h>
77
#include <node/blockstorage.h>
8+
#include <node/ui_interface.h>
89
#include <shutdown.h>
910
#include <tinyformat.h>
10-
#include <ui_interface.h>
1111
#include <util/thread.h>
1212
#include <util/translation.h>
1313
#include <validation.h> // For g_chainman

src/index/txindex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
#include <index/disktxpos.h>
66
#include <index/txindex.h>
7+
#include <node/ui_interface.h>
78
#include <shutdown.h>
8-
#include <ui_interface.h>
99
#include <util/system.h>
1010
#include <util/translation.h>
1111
#include <validation.h>

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <netbase.h>
3939
#include <node/blockstorage.h>
4040
#include <node/context.h>
41+
#include <node/ui_interface.h>
4142
#include <policy/feerate.h>
4243
#include <policy/fees.h>
4344
#include <policy/policy.h>
@@ -54,7 +55,6 @@
5455
#include <torcontrol.h>
5556
#include <txdb.h>
5657
#include <txmempool.h>
57-
#include <ui_interface.h>
5858
#include <util/asmap.h>
5959
#include <util/error.h>
6060
#include <util/moneystr.h>

src/interfaces/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#include <pubkey.h> // For CKeyID and CScriptID (definitions needed in CTxDestination instantiation)
1212
#include <script/standard.h> // For CTxDestination
1313
#include <support/allocators/secure.h> // For SecureString
14-
#include <ui_interface.h> // For ChangeType
1514
#include <util/message.h>
15+
#include <util/ui_change_type.h>
1616

1717
#include <functional>
1818
#include <map>

0 commit comments

Comments
 (0)