diff options
author | Anthony Towns <aj@erisian.com.au> | 2021-01-31 00:55:54 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2021-02-26 23:55:03 +1000 |
commit | 9d5313df7eedad8562c822f5477747e924929fd3 (patch) | |
tree | 536a9a73902a59cf14a69c3528d938587573d905 /src/test | |
parent | 56f06a986385b24818a53fde24c6f3a0b01f1a93 (diff) |
move-only: Add txorphanage module
This module captures orphan tracking code for tx relay.
Can be reviewed with --color-moved=dimmed-zebra
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/denialofservice_tests.cpp | 10 | ||||
-rw-r--r-- | src/test/fuzz/process_message.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/process_messages.cpp | 1 |
3 files changed, 3 insertions, 9 deletions
diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp index 0d480e35ea..e2e38b3f03 100644 --- a/src/test/denialofservice_tests.cpp +++ b/src/test/denialofservice_tests.cpp @@ -14,6 +14,7 @@ #include <script/signingprovider.h> #include <script/standard.h> #include <serialize.h> +#include <txorphanage.h> #include <util/memory.h> #include <util/string.h> #include <util/system.h> @@ -45,15 +46,6 @@ struct CConnmanTest : public CConnman { // Tests these internal-to-net_processing.cpp methods: extern bool AddOrphanTx(const CTransactionRef& tx, NodeId peer); -extern void EraseOrphansFor(NodeId peer); -extern unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans); - -struct COrphanTx { - CTransactionRef tx; - NodeId fromPeer; - int64_t nTimeExpire; -}; -extern std::map<uint256, COrphanTx> mapOrphanTransactions GUARDED_BY(g_cs_orphans); static CService ip(uint32_t i) { diff --git a/src/test/fuzz/process_message.cpp b/src/test/fuzz/process_message.cpp index 442e32d4ca..cea724344e 100644 --- a/src/test/fuzz/process_message.cpp +++ b/src/test/fuzz/process_message.cpp @@ -18,6 +18,7 @@ #include <test/util/net.h> #include <test/util/setup_common.h> #include <test/util/validation.h> +#include <txorphanage.h> #include <util/memory.h> #include <validationinterface.h> #include <version.h> diff --git a/src/test/fuzz/process_messages.cpp b/src/test/fuzz/process_messages.cpp index ef45196671..12186f4f25 100644 --- a/src/test/fuzz/process_messages.cpp +++ b/src/test/fuzz/process_messages.cpp @@ -13,6 +13,7 @@ #include <test/util/net.h> #include <test/util/setup_common.h> #include <test/util/validation.h> +#include <txorphanage.h> #include <util/memory.h> #include <validation.h> #include <validationinterface.h> |