Skip to content
Closed
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
2 changes: 1 addition & 1 deletion include/bitcoin/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <bitcoin/node/channels/channel_peer.hpp>
#include <bitcoin/node/channels/channels.hpp>
#include <bitcoin/node/chasers/chaser.hpp>
#include <bitcoin/node/chasers/chaser_check.hpp>
#include <bitcoin/node/chasers/chaser_download.hpp>
#include <bitcoin/node/chasers/chaser_confirm.hpp>
#include <bitcoin/node/chasers/chaser_estimate.hpp>
#include <bitcoin/node/chasers/chaser_header.hpp>
Expand Down
28 changes: 14 additions & 14 deletions include/bitcoin/node/chase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ enum class chase
/// -----------------------------------------------------------------------

/// Chasers directed to start operating.
/// Issued by 'full_node' and handled by 'check', 'validate', 'confirm'.
/// Issued by 'full_node' and handled by 'download', 'validate', 'confirm'.
start,

/// Disk space is limited.
Expand All @@ -54,35 +54,35 @@ enum class chase
snap,

/// Chaser directed to attempt start from its current position.
/// Issued by 'organize' and handled by 'check', 'validate', 'confirm'.
/// Issued by 'organize' and handled by 'download', 'validate', 'confirm'.
bump,

/// Channels (all) directed to stop with the given code.
/// Issued by 'full_node' and handled by 'observer'.
suspend,

/// Chasers (all) directed to resume following suspend.
/// Issued by 'full_node' and handled by 'check', 'validate', 'confirm'.
/// Issued by 'full_node' and handled by 'download', 'validate', 'confirm'.
resume,

/// Node is recovering from disk full condition.
/// Issued by 'storage' and handled by 'validate'.
unfull,

/// Channel starved for work.
/// Issued by 'block_in_31800' and handled by 'check'.
/// Issued by 'block_in_31800' and handled by 'download'.
starved,

/// Channel (slow) directed to split work and stop.
/// Issued by 'check' and handled by 'block_in_31800'.
/// Issued by 'download' and handled by 'block_in_31800'.
split,

/// Channels (all with work) directed to split work and stop.
/// Issued by 'check' and handled by 'block_in_31800'.
/// Issued by 'download' and handled by 'block_in_31800'.
stall,

/// Channels (all with work) directed to drop work and stop.
/// Issued by 'check' and handled by 'block_in_31800'.
/// Issued by 'download' and handled by 'block_in_31800'.
purge,

/// Channels (all) directed to write work count to the log.
Expand All @@ -93,26 +93,26 @@ enum class chase
/// -----------------------------------------------------------------------

/// A new candidate branch exists from given branch point.
/// Issued by 'header' and handled by 'check'.
/// Issued by 'header' and handled by 'download'.
headers,

/// New candidate headers without txs exist.
/// Issued by 'check' and handled by 'block_in_31800'.
/// Issued by 'download' and handled by 'block_in_31800'.
download,

/// The candidate chain has been reorganized (branched below its top).
/// Issued by 'organize' and handled by 'check', 'validate', 'confirm'.
/// Issued by 'organize' and handled by 'download', 'validate', 'confirm'.
regressed,

/// unchecked, unvalid or unconfirmable was handled.
/// Issued by 'organize' and handled by 'check', 'validate', 'confirm'.
/// Issued by 'organize' and handled by 'download', 'validate', 'confirm'.
disorganized,

/// Check/Identify.
/// -----------------------------------------------------------------------

/// A block has been downloaded, checked and stored.
/// Issued by 'block_in_31800', handled by 'check', 'validate'.
/// Issued by 'block_in_31800', handled by 'download', 'validate'.
/// Populate is bypassed for checkpoint/milestone blocks.
checked,

Expand All @@ -121,14 +121,14 @@ enum class chase
unchecked,

/// A downloaded window is completed by check.
/// Issued by 'check' and handled by 'validate'.
/// Issued by 'download' and handled by 'validate'.
windowed,

/// Accept/Connect.
/// -----------------------------------------------------------------------

/// A branch has become valid.
/// Issued by 'validate' and handled by 'check', 'confirm'.
/// Issued by 'validate' and handled by 'download', 'confirm'.
valid,

/// A checked block has failed validation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* 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_CHECK_HPP
#define LIBBITCOIN_NODE_CHASERS_CHASER_CHECK_HPP
#ifndef LIBBITCOIN_NODE_CHASERS_CHASER_DOWNLOAD_HPP
#define LIBBITCOIN_NODE_CHASERS_CHASER_DOWNLOAD_HPP

#include <deque>
#include <unordered_map>
Expand All @@ -30,19 +30,19 @@ namespace node {
class full_node;

/// Maintain set of pending downloads identifiers for candidate header chain.
class BCN_API chaser_check
class BCN_API chaser_download
: public chaser
{
public:
DELETE_COPY_MOVE_DESTRUCT(chaser_check);
DELETE_COPY_MOVE_DESTRUCT(chaser_download);

/// Create empty shared map.
static map_ptr empty_map() NOEXCEPT;

/// Move half of map into returned map.
static map_ptr split(const map_ptr& map) NOEXCEPT;

chaser_check(full_node& node) NOEXCEPT;
chaser_download(full_node& node) NOEXCEPT;

/// Initialize chaser state.
code start() NOEXCEPT override;
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/node/chasers/chasers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define LIBBITCOIN_NODE_CHASERS_CHASERS_HPP

#include <bitcoin/node/chasers/chaser.hpp>
#include <bitcoin/node/chasers/chaser_check.hpp>
#include <bitcoin/node/chasers/chaser_download.hpp>
#include <bitcoin/node/chasers/chaser_confirm.hpp>
#include <bitcoin/node/chasers/chaser_estimate.hpp>
#include <bitcoin/node/chasers/chaser_header.hpp>
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/node/full_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class BCN_API full_node

// These are protected by strand.
chaser_header chaser_header_;
chaser_check chaser_check_;
chaser_download chaser_download_;
chaser_validate chaser_validate_;
chaser_confirm chaser_confirm_;
chaser_transaction chaser_transaction_;
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/node/protocols/protocol_block_in_31800.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BCN_API protocol_block_in_31800
block_type_(session->node_settings().require_witness ?
type_id::witness_block : type_id::block),
node_pruned_(session->node_settings().limited_blocks),
map_(chaser_check::empty_map()),
map_(chaser_download::empty_map()),
network::tracker<protocol_block_in_31800>(session->log)
{
}
Expand Down
Loading
Loading