Skip to content

Commit

Permalink
Merge pull request #685 from evoskuil/master
Browse files Browse the repository at this point in the history
Remove chaser_populate.
  • Loading branch information
evoskuil authored Oct 22, 2024
2 parents d9e0be2 + a7f41c7 commit 218feed
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 351 deletions.
3 changes: 0 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ src_libbitcoin_node_la_SOURCES = \
src/chasers/chaser_check.cpp \
src/chasers/chaser_confirm.cpp \
src/chasers/chaser_header.cpp \
src/chasers/chaser_populate.cpp \
src/chasers/chaser_snapshot.cpp \
src/chasers/chaser_storage.cpp \
src/chasers/chaser_template.cpp \
Expand Down Expand Up @@ -95,7 +94,6 @@ test_libbitcoin_node_test_SOURCES = \
test/chasers/chaser_check.cpp \
test/chasers/chaser_confirm.cpp \
test/chasers/chaser_header.cpp \
test/chasers/chaser_populate.cpp \
test/chasers/chaser_template.cpp \
test/chasers/chaser_transaction.cpp \
test/chasers/chaser_validate.cpp \
Expand Down Expand Up @@ -149,7 +147,6 @@ include_bitcoin_node_chasers_HEADERS = \
include/bitcoin/node/chasers/chaser_confirm.hpp \
include/bitcoin/node/chasers/chaser_header.hpp \
include/bitcoin/node/chasers/chaser_organize.hpp \
include/bitcoin/node/chasers/chaser_populate.hpp \
include/bitcoin/node/chasers/chaser_snapshot.hpp \
include/bitcoin/node/chasers/chaser_storage.hpp \
include/bitcoin/node/chasers/chaser_template.hpp \
Expand Down
2 changes: 0 additions & 2 deletions builds/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ add_library( ${CANONICAL_LIB_NAME}
"../../src/chasers/chaser_check.cpp"
"../../src/chasers/chaser_confirm.cpp"
"../../src/chasers/chaser_header.cpp"
"../../src/chasers/chaser_populate.cpp"
"../../src/chasers/chaser_snapshot.cpp"
"../../src/chasers/chaser_storage.cpp"
"../../src/chasers/chaser_template.cpp"
Expand Down Expand Up @@ -335,7 +334,6 @@ if (with-tests)
"../../test/chasers/chaser_check.cpp"
"../../test/chasers/chaser_confirm.cpp"
"../../test/chasers/chaser_header.cpp"
"../../test/chasers/chaser_populate.cpp"
"../../test/chasers/chaser_template.cpp"
"../../test/chasers/chaser_transaction.cpp"
"../../test/chasers/chaser_validate.cpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
<ClCompile Include="..\..\..\..\test\chasers\chaser_check.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_confirm.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_header.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_populate.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_template.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_transaction.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_validate.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
<ClCompile Include="..\..\..\..\test\chasers\chaser_header.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chasers\chaser_populate.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chasers\chaser_template.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
Expand Down
2 changes: 0 additions & 2 deletions builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<ClCompile Include="..\..\..\..\src\chasers\chaser_check.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_confirm.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_header.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_populate.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_snapshot.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_storage.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_template.cpp" />
Expand Down Expand Up @@ -119,7 +118,6 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_confirm.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_header.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_organize.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_populate.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_snapshot.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_storage.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_template.hpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@
<ClCompile Include="..\..\..\..\src\chasers\chaser_header.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\chasers\chaser_populate.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\chasers\chaser_snapshot.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
Expand Down Expand Up @@ -182,9 +179,6 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_organize.hpp">
<Filter>include\bitcoin\node\chasers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_populate.hpp">
<Filter>include\bitcoin\node\chasers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_snapshot.hpp">
<Filter>include\bitcoin\node\chasers</Filter>
</ClInclude>
Expand Down
20 changes: 4 additions & 16 deletions console/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,9 +738,7 @@ void executor::read_test() const
{
logger("Wire size computation.");
const auto start = fine_clock::now();

////constexpr auto last = 500'000_size;
const auto last = query_.get_top_candidate();
const auto last = metadata_.configured.node.maximum_height;

size_t size{};
for (auto height = zero; !cancel_ && height <= last; ++height)
Expand Down Expand Up @@ -1344,23 +1342,13 @@ void executor::read_test() const
//// return;
////}
////
////database::context context{};
////if (!query_.get_context(context, bk_link))
////chain::context ctx{};
////if (!query_.get_context(ctx, bk_link))
////{
//// logger("!query_.get_context(context, bk_link)");
//// logger("!query_.get_context(ctx, bk_link)");
//// return;
////}
////
////const chain::context ctx
////{
//// context.flags,
//// {},
//// context.mtp,
//// context.height,
//// {},
//// {}
////};
////
////if (!query_.populate_with_metadata(*tx))
////{
//// logger("!query_.populate_with_metadata(*tx)");
Expand Down
1 change: 0 additions & 1 deletion include/bitcoin/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <bitcoin/node/chasers/chaser_confirm.hpp>
#include <bitcoin/node/chasers/chaser_header.hpp>
#include <bitcoin/node/chasers/chaser_organize.hpp>
#include <bitcoin/node/chasers/chaser_populate.hpp>
#include <bitcoin/node/chasers/chaser_snapshot.hpp>
#include <bitcoin/node/chasers/chaser_storage.hpp>
#include <bitcoin/node/chasers/chaser_template.hpp>
Expand Down
67 changes: 0 additions & 67 deletions include/bitcoin/node/chasers/chaser_populate.hpp

This file was deleted.

1 change: 0 additions & 1 deletion include/bitcoin/node/chasers/chasers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <bitcoin/node/chasers/chaser_confirm.hpp>
#include <bitcoin/node/chasers/chaser_header.hpp>
#include <bitcoin/node/chasers/chaser_organize.hpp>
#include <bitcoin/node/chasers/chaser_populate.hpp>
#include <bitcoin/node/chasers/chaser_snapshot.hpp>
#include <bitcoin/node/chasers/chaser_storage.hpp>
#include <bitcoin/node/chasers/chaser_template.hpp>
Expand Down
13 changes: 0 additions & 13 deletions include/bitcoin/node/full_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,6 @@ class BCN_API full_node
/// Unsubscribe from chaser events.
virtual void unsubscribe_events(object_key key) NOEXCEPT;

/// Blocks.
/// -----------------------------------------------------------------------

/// Populate a candidate block for validation.
virtual void populate(const system::chain::block::cptr& block,
const database::header_link& link, size_t height,
network::result_handler&& complete) NOEXCEPT;

/// Validate a populated candidate block.
virtual void validate(const system::chain::block::cptr& block,
const database::header_link& link, size_t height) NOEXCEPT;

/// Suspensions.
/// -----------------------------------------------------------------------

Expand Down Expand Up @@ -180,7 +168,6 @@ class BCN_API full_node
chaser_block chaser_block_;
chaser_header chaser_header_;
chaser_check chaser_check_;
chaser_populate chaser_populate_;
chaser_validate chaser_validate_;
chaser_confirm chaser_confirm_;
chaser_transaction chaser_transaction_;
Expand Down
12 changes: 0 additions & 12 deletions include/bitcoin/node/protocols/protocol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,6 @@ class BCN_API protocol
/// Get the subscription key (for notify_one).
virtual object_key events_key() const NOEXCEPT;

/// Blocks.
/// -----------------------------------------------------------------------

/// Populate a candidate block for validation.
virtual void populate(const system::chain::block::cptr& block,
const database::header_link& link, size_t height,
network::result_handler&& complete) NOEXCEPT;

/// Validate a populated candidate block.
virtual void validate(const system::chain::block::cptr& block,
const database::header_link& link, size_t height) NOEXCEPT;

/// Properties.
/// -----------------------------------------------------------------------

Expand Down
12 changes: 0 additions & 12 deletions include/bitcoin/node/sessions/session.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,6 @@ class BCN_API session
/// Unsubscribe from chaser events.
virtual void unsubscribe_events(object_key key) NOEXCEPT;

/// Blocks.
/// -----------------------------------------------------------------------

/// Populate a candidate block for validation.
virtual void populate(const system::chain::block::cptr& block,
const database::header_link& link, size_t height,
network::result_handler&& complete) NOEXCEPT;

/// Validate a populated candidate block.
virtual void validate(const system::chain::block::cptr& block,
const database::header_link& link, size_t height) NOEXCEPT;

/// Methods.
/// -----------------------------------------------------------------------

Expand Down
117 changes: 0 additions & 117 deletions src/chasers/chaser_populate.cpp

This file was deleted.

Loading

0 comments on commit 218feed

Please sign in to comment.