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
Changes to show checkpointedness of transactions #866
Changes from 2 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 |
---|---|---|
|
@@ -494,6 +494,7 @@ namespace tools | |
bool double_spend_seen; // True if the key image(s) for the transfer have been seen before. | ||
uint64_t confirmations; // Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed). | ||
uint64_t suggested_confirmations_threshold; | ||
bool checkpointed = false; // If the transfer is backed by atleast (2 service node|| 1 hardcoded) checkpoints // TODO(loki): Make this count the number of checkpoints backing this transfer | ||
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. This TODO would be nice, but I expect it is actually fairly tricky/expensive to calculate. 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. Indeed. Non trivial atm, considering checkpoints can arrive out of order. |
||
}; | ||
|
||
typedef std::vector<transfer_details> transfer_container; | ||
|
@@ -963,6 +964,7 @@ namespace tools | |
|
||
uint64_t get_last_block_reward() const { return m_last_block_reward; } | ||
uint64_t get_device_last_key_image_sync() const { return m_device_last_key_image_sync; } | ||
uint64_t get_immutable_height() const { return m_immutable_height; } | ||
|
||
template <class t_archive> | ||
inline void serialize(t_archive &a, const unsigned int ver) | ||
|
@@ -1077,6 +1079,9 @@ namespace tools | |
if(ver < 28) | ||
return; | ||
a & m_cold_key_images; | ||
if(ver < 29) | ||
return; | ||
a & m_immutable_height; | ||
} | ||
|
||
/*! | ||
|
@@ -1667,6 +1672,7 @@ namespace tools | |
std::string m_device_derivation_path; | ||
uint64_t m_device_last_key_image_sync; | ||
bool m_offline; | ||
uint64_t m_immutable_height; | ||
|
||
// Aux transaction data from device | ||
std::unordered_map<crypto::hash, std::string> m_tx_device; | ||
|
@@ -1721,7 +1727,7 @@ namespace tools | |
bool parse_priority (const std::string& arg, uint32_t& priority); | ||
|
||
} | ||
BOOST_CLASS_VERSION(tools::wallet2, 28) | ||
BOOST_CLASS_VERSION(tools::wallet2, 29) | ||
BOOST_CLASS_VERSION(tools::wallet2::transfer_details, 12) | ||
BOOST_CLASS_VERSION(tools::wallet2::multisig_info, 1) | ||
BOOST_CLASS_VERSION(tools::wallet2::multisig_info::LR, 0) | ||
|
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.
The empty case is more commonly
return boost::none;
, but I see nothing else here is doing that so I guess leave it. 😞