Update ::wire:: to be closer to Monero variant (#70)

This commit is contained in:
Lee *!* Clagett
2023-06-07 09:01:46 -04:00
committed by Lee *!* Clagett
parent 3e0555e07d
commit e1bd9541f1
36 changed files with 992 additions and 587 deletions

View File

@@ -54,10 +54,11 @@ namespace wire
if (!formatter_.IsComplete())
throw std::logic_error{"json_writer::take_json() failed with incomplete JSON tree"};
}
epee::byte_slice json_writer::take_json()
epee::byte_stream json_writer::take_json()
{
check_complete();
epee::byte_slice out{std::move(bytes_)};
epee::byte_stream out{std::move(bytes_)};
bytes_.clear();
formatter_.Reset(bytes_);
return out;
}