Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ src_libbitcoin_node_la_SOURCES = \
src/block_memory.cpp \
src/configuration.cpp \
src/error.cpp \
src/estimator.cpp \
src/full_node.cpp \
src/settings.cpp \
src/channels/channel_peer.cpp \
src/chasers/chaser.cpp \
src/chasers/chaser_block.cpp \
src/chasers/chaser_check.cpp \
src/chasers/chaser_confirm.cpp \
src/chasers/chaser_estimate.cpp \
src/chasers/chaser_header.cpp \
src/chasers/chaser_snapshot.cpp \
src/chasers/chaser_storage.cpp \
Expand Down Expand Up @@ -89,6 +91,7 @@ test_libbitcoin_node_test_SOURCES = \
test/channel_peer.cpp \
test/configuration.cpp \
test/error.cpp \
test/estimator.cpp \
test/full_node.cpp \
test/main.cpp \
test/settings.cpp \
Expand All @@ -98,6 +101,7 @@ test_libbitcoin_node_test_SOURCES = \
test/chasers/chaser_block.cpp \
test/chasers/chaser_check.cpp \
test/chasers/chaser_confirm.cpp \
test/chasers/chaser_estimate.cpp \
test/chasers/chaser_header.cpp \
test/chasers/chaser_template.cpp \
test/chasers/chaser_transaction.cpp \
Expand All @@ -121,6 +125,7 @@ include_bitcoin_node_HEADERS = \
include/bitcoin/node/configuration.hpp \
include/bitcoin/node/define.hpp \
include/bitcoin/node/error.hpp \
include/bitcoin/node/estimator.hpp \
include/bitcoin/node/events.hpp \
include/bitcoin/node/full_node.hpp \
include/bitcoin/node/settings.hpp \
Expand All @@ -138,6 +143,7 @@ include_bitcoin_node_chasers_HEADERS = \
include/bitcoin/node/chasers/chaser_block.hpp \
include/bitcoin/node/chasers/chaser_check.hpp \
include/bitcoin/node/chasers/chaser_confirm.hpp \
include/bitcoin/node/chasers/chaser_estimate.hpp \
include/bitcoin/node/chasers/chaser_header.hpp \
include/bitcoin/node/chasers/chaser_organize.hpp \
include/bitcoin/node/chasers/chaser_snapshot.hpp \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,14 @@
<ClCompile Include="..\..\..\..\test\chasers\chaser_block.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_check.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_confirm.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_estimate.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_header.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_template.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_transaction.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_validate.cpp" />
<ClCompile Include="..\..\..\..\test\configuration.cpp" />
<ClCompile Include="..\..\..\..\test\error.cpp" />
<ClCompile Include="..\..\..\..\test\estimator.cpp" />
<ClCompile Include="..\..\..\..\test\full_node.cpp" />
<ClCompile Include="..\..\..\..\test\main.cpp" />
<ClCompile Include="..\..\..\..\test\protocols\protocol.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
<ClCompile Include="..\..\..\..\test\chasers\chaser_confirm.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chasers\chaser_estimate.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chasers\chaser_header.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
Expand All @@ -60,6 +63,9 @@
<ClCompile Include="..\..\..\..\test\error.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\estimator.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\full_node.cpp">
<Filter>src</Filter>
</ClCompile>
Expand Down
4 changes: 4 additions & 0 deletions builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
<ClCompile Include="..\..\..\..\src\chasers\chaser_block.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_check.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_confirm.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_estimate.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_header.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_snapshot.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_storage.cpp" />
Expand All @@ -136,6 +137,7 @@
<ClCompile Include="..\..\..\..\src\chasers\chaser_validate.cpp" />
<ClCompile Include="..\..\..\..\src\configuration.cpp" />
<ClCompile Include="..\..\..\..\src\error.cpp" />
<ClCompile Include="..\..\..\..\src\estimator.cpp" />
<ClCompile Include="..\..\..\..\src\full_node.cpp" />
<ClCompile Include="..\..\..\..\src\messages\block.cpp" />
<ClCompile Include="..\..\..\..\src\messages\transaction.cpp" />
Expand Down Expand Up @@ -172,6 +174,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_block.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_check.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_confirm.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_estimate.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_snapshot.hpp" />
Expand All @@ -183,6 +186,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\configuration.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\define.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\error.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\estimator.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\events.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\full_node.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\messages\block.hpp" />
Expand Down
12 changes: 12 additions & 0 deletions builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
<ClCompile Include="..\..\..\..\src\chasers\chaser_confirm.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\chasers\chaser_estimate.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\chasers\chaser_header.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
Expand All @@ -108,6 +111,9 @@
<ClCompile Include="..\..\..\..\src\error.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\estimator.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\full_node.cpp">
<Filter>src</Filter>
</ClCompile>
Expand Down Expand Up @@ -212,6 +218,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_confirm.hpp">
<Filter>include\bitcoin\node\chasers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_estimate.hpp">
<Filter>include\bitcoin\node\chasers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_header.hpp">
<Filter>include\bitcoin\node\chasers</Filter>
</ClInclude>
Expand Down Expand Up @@ -245,6 +254,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\error.hpp">
<Filter>include\bitcoin\node</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\estimator.hpp">
<Filter>include\bitcoin\node</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\events.hpp">
<Filter>include\bitcoin\node</Filter>
</ClInclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,14 @@
<ClCompile Include="..\..\..\..\test\chasers\chaser_block.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_check.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_confirm.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_estimate.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_header.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_template.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_transaction.cpp" />
<ClCompile Include="..\..\..\..\test\chasers\chaser_validate.cpp" />
<ClCompile Include="..\..\..\..\test\configuration.cpp" />
<ClCompile Include="..\..\..\..\test\error.cpp" />
<ClCompile Include="..\..\..\..\test\estimator.cpp" />
<ClCompile Include="..\..\..\..\test\full_node.cpp" />
<ClCompile Include="..\..\..\..\test\main.cpp" />
<ClCompile Include="..\..\..\..\test\protocols\protocol.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
<ClCompile Include="..\..\..\..\test\chasers\chaser_confirm.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chasers\chaser_estimate.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chasers\chaser_header.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
Expand All @@ -60,6 +63,9 @@
<ClCompile Include="..\..\..\..\test\error.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\estimator.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\full_node.cpp">
<Filter>src</Filter>
</ClCompile>
Expand Down
4 changes: 4 additions & 0 deletions builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
<ClCompile Include="..\..\..\..\src\chasers\chaser_block.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_check.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_confirm.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_estimate.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_header.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_snapshot.cpp" />
<ClCompile Include="..\..\..\..\src\chasers\chaser_storage.cpp" />
Expand All @@ -136,6 +137,7 @@
<ClCompile Include="..\..\..\..\src\chasers\chaser_validate.cpp" />
<ClCompile Include="..\..\..\..\src\configuration.cpp" />
<ClCompile Include="..\..\..\..\src\error.cpp" />
<ClCompile Include="..\..\..\..\src\estimator.cpp" />
<ClCompile Include="..\..\..\..\src\full_node.cpp" />
<ClCompile Include="..\..\..\..\src\messages\block.cpp" />
<ClCompile Include="..\..\..\..\src\messages\transaction.cpp" />
Expand Down Expand Up @@ -172,6 +174,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_block.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_check.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_confirm.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_estimate.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_snapshot.hpp" />
Expand All @@ -183,6 +186,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\configuration.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\define.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\error.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\estimator.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\events.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\full_node.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\node\messages\block.hpp" />
Expand Down
12 changes: 12 additions & 0 deletions builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
<ClCompile Include="..\..\..\..\src\chasers\chaser_confirm.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\chasers\chaser_estimate.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\chasers\chaser_header.cpp">
<Filter>src\chasers</Filter>
</ClCompile>
Expand All @@ -108,6 +111,9 @@
<ClCompile Include="..\..\..\..\src\error.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\estimator.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\full_node.cpp">
<Filter>src</Filter>
</ClCompile>
Expand Down Expand Up @@ -212,6 +218,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_confirm.hpp">
<Filter>include\bitcoin\node\chasers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_estimate.hpp">
<Filter>include\bitcoin\node\chasers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\chasers\chaser_header.hpp">
<Filter>include\bitcoin\node\chasers</Filter>
</ClInclude>
Expand Down Expand Up @@ -245,6 +254,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\node\error.hpp">
<Filter>include\bitcoin\node</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\estimator.hpp">
<Filter>include\bitcoin\node</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\node\events.hpp">
<Filter>include\bitcoin\node</Filter>
</ClInclude>
Expand Down
2 changes: 2 additions & 0 deletions include/bitcoin/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <bitcoin/node/configuration.hpp>
#include <bitcoin/node/define.hpp>
#include <bitcoin/node/error.hpp>
#include <bitcoin/node/estimator.hpp>
#include <bitcoin/node/events.hpp>
#include <bitcoin/node/full_node.hpp>
#include <bitcoin/node/settings.hpp>
Expand All @@ -33,6 +34,7 @@
#include <bitcoin/node/chasers/chaser_block.hpp>
#include <bitcoin/node/chasers/chaser_check.hpp>
#include <bitcoin/node/chasers/chaser_confirm.hpp>
#include <bitcoin/node/chasers/chaser_estimate.hpp>
#include <bitcoin/node/chasers/chaser_header.hpp>
#include <bitcoin/node/chasers/chaser_organize.hpp>
#include <bitcoin/node/chasers/chaser_snapshot.hpp>
Expand Down
52 changes: 52 additions & 0 deletions include/bitcoin/node/chasers/chaser_estimate.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* Copyright (c) 2011-2026 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBBITCOIN_NODE_CHASERS_CHASER_ESTIMATE_HPP
#define LIBBITCOIN_NODE_CHASERS_CHASER_ESTIMATE_HPP

#include <bitcoin/node/chasers/chaser.hpp>
#include <bitcoin/node/define.hpp>

namespace libbitcoin {
namespace node {

class full_node;

/// Maintain a running fee estimate cache.
class BCN_API chaser_estimate
: public chaser
{
public:
DELETE_COPY_MOVE_DESTRUCT(chaser_estimate);

chaser_estimate(full_node& node) NOEXCEPT;

code start() NOEXCEPT override;

protected:
virtual bool handle_chase(const code& ec, chase event_,
event_value value) NOEXCEPT;

virtual void do_organized(header_t value) NOEXCEPT;
virtual void do_reorganized(header_t value) NOEXCEPT;
};

} // namespace node
} // namespace libbitcoin

#endif
1 change: 1 addition & 0 deletions include/bitcoin/node/chasers/chasers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <bitcoin/node/chasers/chaser_block.hpp>
#include <bitcoin/node/chasers/chaser_check.hpp>
#include <bitcoin/node/chasers/chaser_confirm.hpp>
#include <bitcoin/node/chasers/chaser_estimate.hpp>
#include <bitcoin/node/chasers/chaser_header.hpp>
#include <bitcoin/node/chasers/chaser_organize.hpp>
#include <bitcoin/node/chasers/chaser_snapshot.hpp>
Expand Down
1 change: 1 addition & 0 deletions include/bitcoin/node/define.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ using type_id = network::messages::peer::inventory_item::type_id;
// Other directory common includes are not internally chained.
// Each header includes only its required common headers.

// estimator : define
// settings : define
// configuration : define settings
// parser : define configuration
Expand Down
Loading
Loading