Skip to content

Commit f9f309c

Browse files
committed
Change code transaction_non_final to absolute_time_locked.
1 parent e2b0cbe commit f9f309c

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

include/bitcoin/system/error/transaction_error_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ enum transaction_error_t
4747

4848
// accept transaction
4949
unexpected_witness_transaction,
50-
transaction_non_final,
5150
premature_validation,
5251
unspent_duplicate,
5352
missing_previous_output,
5453
double_spend,
5554
coinbase_maturity,
5655
spend_exceeds_value,
5756
transaction_sigop_limit,
57+
absolute_time_locked,
5858
relative_time_locked,
5959
transaction_weight_limit,
6060

src/error/transaction_error_t.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ DEFINE_ERROR_T_MESSAGE_MAP(transaction_error)
4141

4242
// accept transaction
4343
{ unexpected_witness_transaction, "unexpected witness transaction" },
44-
{ transaction_non_final, "transaction currently non-final" },
4544
{ premature_validation, "transaction validation under checkpoint" },
4645
{ unspent_duplicate, "matching transaction with unspent outputs" },
4746
{ missing_previous_output, "previous output not found" },
4847
{ double_spend, "double spend of input" },
4948
{ coinbase_maturity, "immature coinbase spent" },
5049
{ spend_exceeds_value, "spend exceeds value of inputs" },
5150
{ transaction_sigop_limit, "too many transaction embedded signature operations" },
52-
{ relative_time_locked, "transaction currently locked" },
51+
{ absolute_time_locked, "transaction absolute time locked" },
52+
{ relative_time_locked, "transaction relative time locked" },
5353
{ transaction_weight_limit, "transaction weight limit exceeded" },
5454

5555
// dconfirm transaction

test/error/transaction_error_t.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,6 @@ BOOST_AUTO_TEST_CASE(transaction_error_t__code__unexpected_witness_transaction__
114114
BOOST_REQUIRE_EQUAL(ec.message(), "unexpected witness transaction");
115115
}
116116

117-
BOOST_AUTO_TEST_CASE(transaction_error_t__code__transaction_non_final__true_exected_message)
118-
{
119-
constexpr auto value = error::transaction_non_final;
120-
const auto ec = code(value);
121-
BOOST_REQUIRE(ec);
122-
BOOST_REQUIRE(ec == value);
123-
BOOST_REQUIRE_EQUAL(ec.message(), "transaction currently non-final");
124-
}
125-
126117
BOOST_AUTO_TEST_CASE(transaction_error_t__code__premature_validation__true_exected_message)
127118
{
128119
constexpr auto value = error::premature_validation;
@@ -186,13 +177,22 @@ BOOST_AUTO_TEST_CASE(transaction_error_t__code__transaction_sigop_limit__true_ex
186177
BOOST_REQUIRE_EQUAL(ec.message(), "too many transaction embedded signature operations");
187178
}
188179

180+
BOOST_AUTO_TEST_CASE(transaction_error_t__code__absolute_time_locked__true_exected_message)
181+
{
182+
constexpr auto value = error::absolute_time_locked;
183+
const auto ec = code(value);
184+
BOOST_REQUIRE(ec);
185+
BOOST_REQUIRE(ec == value);
186+
BOOST_REQUIRE_EQUAL(ec.message(), "transaction absolute time locked");
187+
}
188+
189189
BOOST_AUTO_TEST_CASE(transaction_error_t__code__relative_time_locked__true_exected_message)
190190
{
191191
constexpr auto value = error::relative_time_locked;
192192
const auto ec = code(value);
193193
BOOST_REQUIRE(ec);
194194
BOOST_REQUIRE(ec == value);
195-
BOOST_REQUIRE_EQUAL(ec.message(), "transaction currently locked");
195+
BOOST_REQUIRE_EQUAL(ec.message(), "transaction relative time locked");
196196
}
197197

198198
BOOST_AUTO_TEST_CASE(transaction_error_t__code__transaction_weight_limit__true_exected_message)

0 commit comments

Comments
 (0)