Skip to content

Commit ceca453

Browse files
committed
Change <> to () for underflow op serial, avoids boost;:json escape.
1 parent 72e17cd commit ceca453

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/chain/operation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,10 @@ static std::string opcode_to_prefix(opcode code,
465465
std::string operation::to_string(uint32_t active_flags) const NOEXCEPT
466466
{
467467
if (!is_valid())
468-
return "(?)";
468+
return "?";
469469

470470
if (underflow_)
471-
return "<" + encode_base16(get_data()) + ">";
471+
return "(" + encode_base16(get_data()) + ")";
472472

473473
if (data_empty())
474474
return opcode_to_mnemonic(code_, active_flags);

test/chain/operation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ BOOST_AUTO_TEST_CASE(operation__to_string__empty_underflow__empty)
781781
operation value(encoded);
782782
BOOST_REQUIRE(value.is_invalid());
783783
BOOST_REQUIRE(value.is_underflow());
784-
BOOST_REQUIRE_EQUAL(value.to_string(0), "<>");
784+
BOOST_REQUIRE_EQUAL(value.to_string(0), "()");
785785
}
786786

787787
BOOST_AUTO_TEST_CASE(operation__to_string__non_empty_underflow__empty)
@@ -791,7 +791,7 @@ BOOST_AUTO_TEST_CASE(operation__to_string__non_empty_underflow__empty)
791791
operation value(encoded);
792792
BOOST_REQUIRE(value.is_invalid());
793793
BOOST_REQUIRE(value.is_underflow());
794-
BOOST_REQUIRE_EQUAL(value.to_string(0), "<02ff>");
794+
BOOST_REQUIRE_EQUAL(value.to_string(0), "(02ff)");
795795
}
796796

797797
BOOST_AUTO_TEST_CASE(operation__to_string__nop2_no_rules__nop2)

0 commit comments

Comments
 (0)