aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-05-11 08:52:06 +1000
committerfanquake <fanquake@gmail.com>2021-05-11 08:52:37 +1000
commit4a267057617a8aa6dc9793c4d711725df5338025 (patch)
treee2eded26fa28dddde5c3fa3cc9ff0f20a9cf8f04 /src/test
parent4bc3b16349848100e6a127c71a3a2fe7e1e57c2d (diff)
parentfa4bbd306e1ca369d02eb864983fbb4d64b50ca9 (diff)
downloadbitcoin-4a267057617a8aa6dc9793c4d711725df5338025.tar.xz
Merge bitcoin/bitcoin#21902: refactor: Remove useless extern keyword
fa4bbd306e1ca369d02eb864983fbb4d64b50ca9 refactor: Remove useless extern keyword (MarcoFalke) Pull request description: It is redundant, confusing and useless. https://en.cppreference.com/w/cpp/language/storage_duration#external_linkage ACKs for top commit: practicalswift: cr ACK fa4bbd306e1ca369d02eb864983fbb4d64b50ca9: patch looks correct Talkless: utACK fa4bbd306e1ca369d02eb864983fbb4d64b50ca9, built successfully on Debian Sid, looks OK. jonatack: Light code review ACK fa4bbd306e1ca369d02eb864983fbb4d64b50ca9 hebasto: ACK fa4bbd306e1ca369d02eb864983fbb4d64b50ca9, I've verified that all of the remained `extern` keywords specify either (a) a variable with external linkage, or (b) a symbol with "C" language linkage. promag: Code review ACK fa4bbd306e1ca369d02eb864983fbb4d64b50ca9. Tree-SHA512: 1d77d661132defa52ccb2046f7a287deb3669b68835e40ab75a0d9d08fe6efeaf3bea7c0e76c754fd18bfe45972c253a39462014080d014cc5d810498784e3e4
Diffstat (limited to 'src/test')
-rw-r--r--src/test/base58_tests.cpp2
-rw-r--r--src/test/key_io_tests.cpp2
-rw-r--r--src/test/script_tests.cpp3
-rw-r--r--src/test/sighash_tests.cpp2
-rw-r--r--src/test/transaction_tests.cpp2
5 files changed, 5 insertions, 6 deletions
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index dd760fe999..a090cb340b 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -16,7 +16,7 @@
using namespace std::literals;
-extern UniValue read_json(const std::string& jsondata);
+UniValue read_json(const std::string& jsondata);
BOOST_FIXTURE_TEST_SUITE(base58_tests, BasicTestingSetup)
diff --git a/src/test/key_io_tests.cpp b/src/test/key_io_tests.cpp
index 611e9f2623..8629d13840 100644
--- a/src/test/key_io_tests.cpp
+++ b/src/test/key_io_tests.cpp
@@ -15,7 +15,7 @@
#include <univalue.h>
-extern UniValue read_json(const std::string& jsondata);
+UniValue read_json(const std::string& jsondata);
BOOST_FIXTURE_TEST_SUITE(key_io_tests, BasicTestingSetup)
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 171234f745..62fd81673d 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -39,8 +39,7 @@ static const unsigned int gFlags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
unsigned int ParseScriptFlags(std::string strFlags);
std::string FormatScriptFlags(unsigned int flags);
-UniValue
-read_json(const std::string& jsondata)
+UniValue read_json(const std::string& jsondata)
{
UniValue v;
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 2eb980e8cd..195565c1f8 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -21,7 +21,7 @@
#include <univalue.h>
-extern UniValue read_json(const std::string& jsondata);
+UniValue read_json(const std::string& jsondata);
// Old script.cpp SignatureHash function
uint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 9bbf9567f5..40c53cb2ec 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -39,7 +39,7 @@
typedef std::vector<unsigned char> valtype;
// In script_tests.cpp
-extern UniValue read_json(const std::string& jsondata);
+UniValue read_json(const std::string& jsondata);
static std::map<std::string, unsigned int> mapFlagNames = {
{std::string("P2SH"), (unsigned int)SCRIPT_VERIFY_P2SH},