Skip to content

Commit b7427ae

Browse files
committed
use single letter for keys dump()
1 parent f11f1ba commit b7427ae

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/config/groups/keys.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ustring Keys::dump() {
7676
ustring Keys::make_dump() const {
7777
oxenc::bt_dict_producer d;
7878
{
79-
auto active = d.append_list("active");
79+
auto active = d.append_list("A");
8080
for (const auto& [gen, hashes] : active_msgs_) {
8181
auto lst = active.append_list();
8282
lst.append(gen);
@@ -86,7 +86,7 @@ ustring Keys::make_dump() const {
8686
}
8787

8888
{
89-
auto keys = d.append_list("keys");
89+
auto keys = d.append_list("L");
9090
for (auto& k : keys_) {
9191
auto ki = keys.append_dict();
9292
// NB: Keys must be in sorted order
@@ -101,7 +101,7 @@ ustring Keys::make_dump() const {
101101
}
102102

103103
if (!pending_key_config_.empty()) {
104-
auto pending = d.append_dict("pending");
104+
auto pending = d.append_dict("P");
105105
// NB: Keys must be in sorted order
106106
pending.append("c", from_unsigned_sv(pending_key_config_));
107107
pending.append("g", pending_gen_);
@@ -114,7 +114,7 @@ ustring Keys::make_dump() const {
114114
void Keys::load_dump(ustring_view dump) {
115115
oxenc::bt_dict_consumer d{from_unsigned_sv(dump)};
116116

117-
if (d.skip_until("active")) {
117+
if (d.skip_until("A")) {
118118
auto active = d.consume_list_consumer();
119119
while (!active.is_finished()) {
120120
auto lst = active.consume_list_consumer();
@@ -126,7 +126,7 @@ void Keys::load_dump(ustring_view dump) {
126126
throw config_value_error{"Invalid Keys dump: `active` not found"};
127127
}
128128

129-
if (d.skip_until("keys")) {
129+
if (d.skip_until("L")) {
130130
auto keys = d.consume_list_consumer();
131131
while (!keys.is_finished()) {
132132
auto kd = keys.consume_dict_consumer();
@@ -156,7 +156,7 @@ void Keys::load_dump(ustring_view dump) {
156156
throw config_value_error{"Invalid Keys dump: `keys` not found"};
157157
}
158158

159-
if (d.skip_until("pending")) {
159+
if (d.skip_until("P")) {
160160
auto pending = d.consume_dict_consumer();
161161

162162
if (!pending.skip_until("c"))

0 commit comments

Comments
 (0)