Skip to content

Commit

Permalink
Rename error::checkpoints_failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Feb 24, 2024
1 parent 1242af3 commit 79a139d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/bitcoin/system/error/block_error_t.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ enum block_error_t : uint8_t
// TODO: order these.

// accept header
checkpoints_failed,
checkpoint_conflict,
invalid_block_version,
timestamp_too_early,
incorrect_proof_of_work,
Expand Down
2 changes: 1 addition & 1 deletion src/error/block_error_t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ DEFINE_ERROR_T_MESSAGE_MAP(block_error)
{ futuristic_timestamp, "timestamp too far in the future" },

// accept header
{ checkpoints_failed, "block hash rejected by checkpoint" },
{ checkpoint_conflict, "block hash rejected by checkpoint" },
{ invalid_block_version, "block version rejected at current height" },
{ timestamp_too_early, "block timestamp is too early" },
{ incorrect_proof_of_work, "proof of work does not match bits field" },
Expand Down
4 changes: 2 additions & 2 deletions test/error/block_error_t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ BOOST_AUTO_TEST_CASE(block_error_t__code__futuristic_timestamp__true_exected_mes

// accept header

BOOST_AUTO_TEST_CASE(block_error_t__code__checkpoints_failed__true_exected_message)
BOOST_AUTO_TEST_CASE(block_error_t__code__checkpoint_conflict__true_exected_message)
{
constexpr auto value = error::checkpoints_failed;
constexpr auto value = error::checkpoint_conflict;
const auto ec = code(value);
BOOST_REQUIRE(ec);
BOOST_REQUIRE(ec == value);
Expand Down

0 comments on commit 79a139d

Please sign in to comment.