FatalError has been copied from AbortNode, so the two should use the same style to avoid confusion.
Follow-up to #18927
FatalError has been copied from AbortNode, so the two should use the same style to avoid confusion.
Follow-up to #18927
This is needed for consistency with AbortNode
Concept ACK.
121 | @@ -122,6 +122,7 @@ void InitWarning(const bilingual_str& str); 122 | 123 | /** Show error message **/ 124 | bool InitError(const bilingual_str& str); 125 | +constexpr auto AbortError = InitError;
Why is this header selected to host this expression?
It should be in a header because it is used in two places. Any suggestions where to put it?
I meant "why in this header" rather "why in header" :)
This header looks good to me. Another possible one is validation.h.
But your variant is better for a code reader, I think.
ACK fa02b473132932c200be1750d1a5b1de14ea2383, I have reviewed the code and it looks OK, I agree it can be merged.
Suggestions for followups:
-debuglogfile option)As @achow101 noticed on IRC, this PR appears to cause the following error on Ubuntu 20.04, but not on macOS. Apparently only with --enable-debug.
./configure --enable-debug --with-incompatible-bdb --enable-werror
make
/usr/bin/ld: bitcoin_wallet-bitcoin-wallet.o:(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)'
/usr/bin/ld: libbitcoin_wallet_tool.a(libbitcoin_wallet_tool_a-wallettool.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-salvage.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-walletdb.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o):(.data.rel.ro+0x8): more undefined references to `InitError(bilingual_str const&)' follow
collect2: error: ld returned 1 exit status
I'm seeing the issue on Debian as well.
$ uname -a
Linux 4.19.0-9-amd64 [#1](/bitcoin-bitcoin/1/) SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux