From fce00a8118a9cfcbcf70a3d585b829037664bf03 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 16 Nov 2020 07:57:30 +0100 Subject: [PATCH] Merge #20033: refactor: minor whitespace fixups, s/const/constexpr/ and remove template (followup to #19845) 89836a82eec63f93bbe6c3bd6a52be26e71ab54d style: minor improvements as a followup to #19845 (Vasil Dimov) Pull request description: Address suggestions: https://github.com/bitcoin/bitcoin/pull/19845#discussion_r495486760 https://github.com/bitcoin/bitcoin/pull/19845#discussion_r495488051 https://github.com/bitcoin/bitcoin/pull/19845#discussion_r495730125 ACKs for top commit: jonatack: re-ACK 89836a8 change since previous review is replacing std::runtime_error with std::exception, built/ran unit tests with gcc debian 10.2.0-15, then broke a few v3 net_tests involving `BOOST_CHECK_EXCEPTION`, rebuilt, ran `src/test/test_bitcoin -t net_tests -l all` and checked the error reporting. hebasto: re-ACK 89836a82eec63f93bbe6c3bd6a52be26e71ab54d theStack: ACK 89836a82eec63f93bbe6c3bd6a52be26e71ab54d Tree-SHA512: 36477fdccabe5a8ad91fbabb4655cc363a3a7ca237a98ae6dd4a9fae4a4113762040f864d4ca13a47d081f7d16e5bd487edbfb61ab50a37e4a0424e9bec30b24 --- src/netaddress.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netaddress.h b/src/netaddress.h index 903cc2a1bd..c6eba8d5c9 100644 --- a/src/netaddress.h +++ b/src/netaddress.h @@ -30,7 +30,7 @@ extern bool fAllowPrivateNet; * should be serialized in (unserialized from) v2 format (BIP155). * Make sure that this does not collide with any of the values in `version.h` */ -static const int ADDRV2_FORMAT = 0x20000000; +static constexpr int ADDRV2_FORMAT = 0x20000000; /** * A network type.