Skip to content

Commit 4696c48

Browse files
committed
Add error::unconfirmable_transaction.
1 parent 868abaf commit 4696c48

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

include/bitcoin/server/error.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ enum error_t : uint8_t
6161
not_found,
6262
not_implemented,
6363
invalid_argument,
64+
unconfirmable_transaction,
6465
argument_overflow,
6566
target_overflow,
6667
server_error

src/error.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ DEFINE_ERROR_T_MESSAGE_MAP(error)
5151
{ not_found, "not_found" },
5252
{ not_implemented, "not_implemented" },
5353
{ invalid_argument, "invalid_argument" },
54+
{ unconfirmable_transaction, "unconfirmable_transaction" },
5455
{ argument_overflow, "argument_overflow" },
5556
{ target_overflow, "target_overflow" },
5657
{ server_error, "server_error" }

test/error.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,15 @@ BOOST_AUTO_TEST_CASE(error_t__code__argument_overflow__true_expected_message)
218218
BOOST_REQUIRE_EQUAL(ec.message(), "argument_overflow");
219219
}
220220

221+
BOOST_AUTO_TEST_CASE(error_t__code__unconfirmable_transaction__true_expected_message)
222+
{
223+
constexpr auto value = error::unconfirmable_transaction;
224+
const auto ec = code(value);
225+
BOOST_REQUIRE(ec);
226+
BOOST_REQUIRE(ec == value);
227+
BOOST_REQUIRE_EQUAL(ec.message(), "unconfirmable_transaction");
228+
}
229+
221230
BOOST_AUTO_TEST_CASE(error_t__code__target_overflow__true_expected_message)
222231
{
223232
constexpr auto value = error::target_overflow;

0 commit comments

Comments
 (0)