aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-11-13 11:34:43 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-11-13 16:38:29 +0000
commita99ab49dd58bfd8b9db7a98946a8536254eb80fa (patch)
tree4089fb02d60bbe026e41c86ab16eae8edd025ae8 /src/wallet
parentMerge pull request #1334 (diff)
downloadmonero-a99ab49dd58bfd8b9db7a98946a8536254eb80fa.tar.xz
wallet: fix serialization of new m_key_image_known member
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index d42385caf..417e754a5 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -611,7 +611,7 @@ namespace tools
};
}
BOOST_CLASS_VERSION(tools::wallet2, 15)
-BOOST_CLASS_VERSION(tools::wallet2::transfer_details, 5)
+BOOST_CLASS_VERSION(tools::wallet2::transfer_details, 6)
BOOST_CLASS_VERSION(tools::wallet2::payment_details, 1)
BOOST_CLASS_VERSION(tools::wallet2::unconfirmed_transfer_details, 6)
BOOST_CLASS_VERSION(tools::wallet2::confirmed_transfer_details, 3)
@@ -640,7 +640,10 @@ namespace boost
{
x.m_rct = x.m_tx.vout[x.m_internal_output_index].amount == 0;
}
- x.m_key_image_known = true;
+ if (ver < 6)
+ {
+ x.m_key_image_known = true;
+ }
}
template <class Archive>
@@ -689,7 +692,18 @@ namespace boost
}
a & x.m_rct;
if (ver < 5)
+ {
+ initialize_transfer_details(a, x, ver);
return;
+ }
+ if (ver < 6)
+ {
+ // v5 did not properly initialize
+ uint8_t u;
+ a & u;
+ x.m_key_image_known = true;
+ return;
+ }
a & x.m_key_image_known;
}