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
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ bool CLASS::set_block_confirmable(const header_link& link) NOEXCEPT
TEMPLATE
bool CLASS::set_block_unconfirmable(const header_link& link) NOEXCEPT
{
return set_block_state(link, block_state::unconfirmable);
return !store_.mark_unconfirmable() ||
set_block_state(link, block_state::unconfirmable);
}

TEMPLATE
Expand Down
6 changes: 6 additions & 0 deletions include/bitcoin/database/impl/store/store.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ bool CLASS::turbo() const NOEXCEPT
return configuration_.turbo;
}

TEMPLATE
bool CLASS::mark_unconfirmable() const NOEXCEPT
{
return configuration_.mark_unconfirmable;
}

TEMPLATE
uint8_t CLASS::interval_depth() const NOEXCEPT
{
Expand Down
4 changes: 4 additions & 0 deletions include/bitcoin/database/query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,10 @@ class query
bool set_signatures(const threshold& group, size_t set,
const header_link& link) NOEXCEPT;

// TODO:
bool purge_signatures() NOEXCEPT { return {}; };
bool verify_signatures(header_links& ) NOEXCEPT { return {}; };

/// Confirmation.
/// -----------------------------------------------------------------------
/// These are not used in consensus confirmation.
Expand Down
3 changes: 3 additions & 0 deletions include/bitcoin/database/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ struct BCD_API settings
/// Enable concurrency in individual client-server queries.
bool turbo{ false };

/// Mark blocks as unconfirmable (disorganize vs. stall).
bool mark_unconfirmable{ true };

/// Depth of electrum merkle tree interval caching.
uint16_t interval_depth{ max_uint8 };

Expand Down
3 changes: 3 additions & 0 deletions include/bitcoin/database/store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class store
/// Allows full throttle concurrent query execution (may use 100% CPU).
bool turbo() const NOEXCEPT;

/// Mark blocks as unconfirmable (disorganize vs. stall), configuration.
bool mark_unconfirmable() const NOEXCEPT;

/// Depth of electrum merkle tree interval caching.
uint8_t interval_depth() const NOEXCEPT;

Expand Down
1 change: 1 addition & 0 deletions test/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ BOOST_AUTO_TEST_CASE(settings__construct__default__expected)
{
database::settings configuration;
BOOST_REQUIRE_EQUAL(configuration.turbo, false);
BOOST_REQUIRE_EQUAL(configuration.mark_unconfirmable, true);
BOOST_REQUIRE_EQUAL(configuration.interval_depth, 255u);
BOOST_REQUIRE_EQUAL(configuration.path, "bitcoin");

Expand Down
Loading