add getter/setter for allow_mismatched_daemon_version

This commit is contained in:
SNeedlewoods 2024-11-08 11:28:36 +01:00
parent a47a07a7d0
commit 8738c59ae9
3 changed files with 21 additions and 0 deletions

View File

@ -3589,6 +3589,16 @@ bool WalletImpl::importKeyImages(std::vector<std::string> key_images, std::size_
return false;
}
//-------------------------------------------------------------------------------------------------------------------
bool WalletImpl::getAllowMismatchedDaemonVersion() const
{
return m_wallet->is_mismatched_daemon_version_allowed();
}
//-------------------------------------------------------------------------------------------------------------------
void WalletImpl::setAllowMismatchedDaemonVersion(bool allow_mismatch)
{
m_wallet->allow_mismatched_daemon_version(allow_mismatch);
}
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
// PRIVATE

View File

@ -278,6 +278,8 @@ public:
std::pair<std::size_t, std::uint64_t> estimateTxSizeAndWeight(bool use_rct, int n_inputs, int ring_size, int n_outputs, std::size_t extra_size) const override;
std::uint64_t importKeyImages(const std::vector<std::pair<std::string, std::string>> &signed_key_images, std::size_t offset, std::uint64_t &spent, std::uint64_t &unspent, bool check_spent = true) override;
bool importKeyImages(std::vector<std::string> key_images, std::size_t offset = 0, std::unordered_set<std::size_t> selected_enotes_indices = {}) override;
bool getAllowMismatchedDaemonVersion() const override;
void setAllowMismatchedDaemonVersion(bool allow_mismatch) override;
private:
void clearStatus() const;

View File

@ -1517,6 +1517,15 @@ struct Wallet
* note: sets status error on fail
*/
virtual bool importKeyImages(std::vector<std::string> key_images, std::size_t offset = 0, std::unordered_set<std::size_t> selected_enotes_indices = {}) = 0;
/**
* brief: getAllowMismatchedDaemonVersion -
*/
virtual bool getAllowMismatchedDaemonVersion() const = 0;
/**
* brief: setAllowMismatchedDaemonVersion -
* param: allow_mismatch -
*/
virtual void setAllowMismatchedDaemonVersion(bool allow_mismatch) = 0;
};
/**