-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add view tags to outputs to reduce wallet scanning time #8061
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,11 @@ namespace boost | |
{ | ||
a & reinterpret_cast<char (&)[sizeof(crypto::key_image)]>(x); | ||
} | ||
|
||
template <class Archive> | ||
inline void serialize(Archive &a, crypto::view_tag &x, const boost::serialization::version_type ver) | ||
{ | ||
a & reinterpret_cast<char (&)[sizeof(crypto::view_tag)]>(x); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this complicated construct instead of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was following the pattern for the other crypto classes right above, I figure deviating from the pattern is more complicated than not I'd guess the intention with the pattern is to avoid referencing |
||
} | ||
template <class Archive> | ||
inline void serialize(Archive &a, crypto::signature &x, const boost::serialization::version_type ver) | ||
{ | ||
|
@@ -102,6 +106,13 @@ namespace boost | |
a & x.key; | ||
} | ||
|
||
template <class Archive> | ||
inline void serialize(Archive &a, cryptonote::txout_to_tagged_key &x, const boost::serialization::version_type ver) | ||
{ | ||
a & x.key; | ||
a & x.view_tag; | ||
} | ||
|
||
template <class Archive> | ||
inline void serialize(Archive &a, cryptonote::txout_to_scripthash &x, const boost::serialization::version_type ver) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to disable auto alignment since the whole struct is hashed below, though it should be ok in practice