Merge pull request #2715

ca87cbd8 wallet2: fix subaddress fields serialization (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-10-31 20:25:40 +02:00
commit 6d1562d94c
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -1042,7 +1042,10 @@ namespace boost
x.m_amount_out += x.m_change; x.m_amount_out += x.m_change;
} }
if (ver < 7) if (ver < 7)
{
x.m_subaddr_account = 0;
return; return;
}
a & x.m_subaddr_account; a & x.m_subaddr_account;
a & x.m_subaddr_indices; a & x.m_subaddr_indices;
} }
@ -1083,7 +1086,10 @@ namespace boost
} }
a & x.m_unlock_time; a & x.m_unlock_time;
if (ver < 5) if (ver < 5)
{
x.m_subaddr_account = 0;
return; return;
}
a & x.m_subaddr_account; a & x.m_subaddr_account;
a & x.m_subaddr_indices; a & x.m_subaddr_indices;
} }
@ -1099,7 +1105,10 @@ namespace boost
return; return;
a & x.m_timestamp; a & x.m_timestamp;
if (ver < 2) if (ver < 2)
{
x.m_subaddr_index = {};
return; return;
}
a & x.m_subaddr_index; a & x.m_subaddr_index;
} }
@ -1110,7 +1119,10 @@ namespace boost
a & x.m_payment_id; a & x.m_payment_id;
a & x.m_description; a & x.m_description;
if (ver < 17) if (ver < 17)
{
x.m_is_subaddress = false;
return; return;
}
a & x.m_is_subaddress; a & x.m_is_subaddress;
} }
@ -1140,7 +1152,10 @@ namespace boost
a & x.use_rct; a & x.use_rct;
a & x.dests; a & x.dests;
if (ver < 1) if (ver < 1)
{
x.subaddr_account = 0;
return; return;
}
a & x.subaddr_account; a & x.subaddr_account;
a & x.subaddr_indices; a & x.subaddr_indices;
} }