mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 07:35:04 -04:00
serialization: do not write optional fields with default value
This commit is contained in:
parent
5f98b46d58
commit
b595583f3d
2 changed files with 4 additions and 2 deletions
|
@ -89,6 +89,8 @@ public: \
|
|||
|
||||
#define KV_SERIALIZE_OPT_N(variable, val_name, default_value) \
|
||||
do { \
|
||||
if (is_store && this_ref.variable == default_value) \
|
||||
break; \
|
||||
if (!epee::serialization::selector<is_store>::serialize(this_ref.variable, stg, hparent_section, val_name)) \
|
||||
epee::serialize_default(this_ref.variable, default_value); \
|
||||
} while (0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue