Skip to content

Commit a84063d

Browse files
committed
Update codes.
1 parent 72176f4 commit a84063d

3 files changed

Lines changed: 19 additions & 30 deletions

File tree

include/bitcoin/database/error.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,11 @@ enum error_t : uint8_t
117117
tx_empty,
118118
tx_tx_allocate,
119119
tx_input_put,
120-
tx_point_allocate,
121-
tx_point_put,
122-
tx_ins_allocate,
123120
tx_ins_put,
124121
tx_output_put,
125122
tx_outs_put,
123+
tx_point_allocate,
124+
tx_point_put,
126125
tx_tx_set,
127126
tx_address_allocate,
128127
tx_address_put,

src/error.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,11 @@ DEFINE_ERROR_T_MESSAGE_MAP(error)
109109
{ tx_empty, "tx_empty" },
110110
{ tx_tx_allocate, "tx_tx_allocate" },
111111
{ tx_input_put, "tx_input_put" },
112-
{ tx_point_allocate, "tx_point_allocate" },
113-
{ tx_point_put, "tx_point_put" },
114-
{ tx_ins_allocate, "tx_ins_allocate" },
115112
{ tx_ins_put, "tx_ins_put" },
116113
{ tx_output_put, "tx_output_put" },
117114
{ tx_outs_put, "tx_outs_put" },
115+
{ tx_point_allocate, "tx_point_allocate" },
116+
{ tx_point_put, "tx_point_put" },
118117
{ tx_tx_set, "tx_tx_set" },
119118
{ tx_address_allocate, "tx_address_allocate" },
120119
{ tx_address_put, "tx_address_put" },

test/error.cpp

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -502,58 +502,49 @@ BOOST_AUTO_TEST_CASE(error_t__code__tx_input_put__true_exected_message)
502502
BOOST_REQUIRE_EQUAL(ec.message(), "tx_input_put");
503503
}
504504

505-
BOOST_AUTO_TEST_CASE(error_t__code__tx_point_allocate__true_exected_message)
506-
{
507-
constexpr auto value = error::tx_point_allocate;
508-
const auto ec = code(value);
509-
BOOST_REQUIRE(ec);
510-
BOOST_REQUIRE(ec == value);
511-
BOOST_REQUIRE_EQUAL(ec.message(), "tx_point_allocate");
512-
}
513-
514-
BOOST_AUTO_TEST_CASE(error_t__code__tx_point_put__true_exected_message)
505+
BOOST_AUTO_TEST_CASE(error_t__code__tx_ins_put__true_exected_message)
515506
{
516-
constexpr auto value = error::tx_point_put;
507+
constexpr auto value = error::tx_ins_put;
517508
const auto ec = code(value);
518509
BOOST_REQUIRE(ec);
519510
BOOST_REQUIRE(ec == value);
520-
BOOST_REQUIRE_EQUAL(ec.message(), "tx_point_put");
511+
BOOST_REQUIRE_EQUAL(ec.message(), "tx_ins_put");
521512
}
522513

523-
BOOST_AUTO_TEST_CASE(error_t__code__tx_ins_allocate__true_exected_message)
514+
BOOST_AUTO_TEST_CASE(error_t__code__tx_output_put__true_exected_message)
524515
{
525-
constexpr auto value = error::tx_ins_allocate;
516+
constexpr auto value = error::tx_output_put;
526517
const auto ec = code(value);
527518
BOOST_REQUIRE(ec);
528519
BOOST_REQUIRE(ec == value);
529-
BOOST_REQUIRE_EQUAL(ec.message(), "tx_ins_allocate");
520+
BOOST_REQUIRE_EQUAL(ec.message(), "tx_output_put");
530521
}
531522

532-
BOOST_AUTO_TEST_CASE(error_t__code__tx_ins_put__true_exected_message)
523+
BOOST_AUTO_TEST_CASE(error_t__code__tx_outs_put__true_exected_message)
533524
{
534-
constexpr auto value = error::tx_ins_put;
525+
constexpr auto value = error::tx_outs_put;
535526
const auto ec = code(value);
536527
BOOST_REQUIRE(ec);
537528
BOOST_REQUIRE(ec == value);
538-
BOOST_REQUIRE_EQUAL(ec.message(), "tx_ins_put");
529+
BOOST_REQUIRE_EQUAL(ec.message(), "tx_outs_put");
539530
}
540531

541-
BOOST_AUTO_TEST_CASE(error_t__code__tx_output_put__true_exected_message)
532+
BOOST_AUTO_TEST_CASE(error_t__code__tx_point_allocate__true_exected_message)
542533
{
543-
constexpr auto value = error::tx_output_put;
534+
constexpr auto value = error::tx_point_allocate;
544535
const auto ec = code(value);
545536
BOOST_REQUIRE(ec);
546537
BOOST_REQUIRE(ec == value);
547-
BOOST_REQUIRE_EQUAL(ec.message(), "tx_output_put");
538+
BOOST_REQUIRE_EQUAL(ec.message(), "tx_point_allocate");
548539
}
549540

550-
BOOST_AUTO_TEST_CASE(error_t__code__tx_outs_put__true_exected_message)
541+
BOOST_AUTO_TEST_CASE(error_t__code__tx_point_put__true_exected_message)
551542
{
552-
constexpr auto value = error::tx_outs_put;
543+
constexpr auto value = error::tx_point_put;
553544
const auto ec = code(value);
554545
BOOST_REQUIRE(ec);
555546
BOOST_REQUIRE(ec == value);
556-
BOOST_REQUIRE_EQUAL(ec.message(), "tx_outs_put");
547+
BOOST_REQUIRE_EQUAL(ec.message(), "tx_point_put");
557548
}
558549

559550
BOOST_AUTO_TEST_CASE(error_t__code__tx_tx_set__true_exected_message)

0 commit comments

Comments
 (0)