mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 08:17:37 +00:00
Merge pull request #4475
6da36ea0
wallet2_api: blackball/unblackball now take two parameters (moneromooo-monero)
This commit is contained in:
commit
64412acd31
3 changed files with 28 additions and 2 deletions
|
@ -2146,6 +2146,28 @@ bool WalletImpl::blackballOutputs(const std::vector<std::string> &outputs, bool
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WalletImpl::blackballOutput(const std::string &amount, const std::string &offset)
|
||||||
|
{
|
||||||
|
uint64_t raw_amount, raw_offset;
|
||||||
|
if (!epee::string_tools::get_xtype_from_string(raw_amount, amount))
|
||||||
|
{
|
||||||
|
setStatusError(tr("Failed to parse output amount"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!epee::string_tools::get_xtype_from_string(raw_offset, offset))
|
||||||
|
{
|
||||||
|
setStatusError(tr("Failed to parse output offset"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool ret = m_wallet->blackball_output(std::make_pair(raw_amount, raw_offset));
|
||||||
|
if (!ret)
|
||||||
|
{
|
||||||
|
setStatusError(tr("Failed to blackball output"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool WalletImpl::unblackballOutput(const std::string &amount, const std::string &offset)
|
bool WalletImpl::unblackballOutput(const std::string &amount, const std::string &offset)
|
||||||
{
|
{
|
||||||
uint64_t raw_amount, raw_offset;
|
uint64_t raw_amount, raw_offset;
|
||||||
|
|
|
@ -182,7 +182,8 @@ public:
|
||||||
virtual std::string getDefaultDataDir() const override;
|
virtual std::string getDefaultDataDir() const override;
|
||||||
virtual bool lightWalletLogin(bool &isNewWallet) const override;
|
virtual bool lightWalletLogin(bool &isNewWallet) const override;
|
||||||
virtual bool lightWalletImportWalletRequest(std::string &payment_id, uint64_t &fee, bool &new_request, bool &request_fulfilled, std::string &payment_address, std::string &status) override;
|
virtual bool lightWalletImportWalletRequest(std::string &payment_id, uint64_t &fee, bool &new_request, bool &request_fulfilled, std::string &payment_address, std::string &status) override;
|
||||||
virtual bool blackballOutputs(const std::vector<std::string> &pubkeys, bool add) override;
|
virtual bool blackballOutputs(const std::vector<std::string> &outputs, bool add) override;
|
||||||
|
virtual bool blackballOutput(const std::string &amount, const std::string &offset) override;
|
||||||
virtual bool unblackballOutput(const std::string &amount, const std::string &offset) override;
|
virtual bool unblackballOutput(const std::string &amount, const std::string &offset) override;
|
||||||
virtual bool getRing(const std::string &key_image, std::vector<uint64_t> &ring) const override;
|
virtual bool getRing(const std::string &key_image, std::vector<uint64_t> &ring) const override;
|
||||||
virtual bool getRings(const std::string &txid, std::vector<std::pair<std::string, std::vector<uint64_t>>> &rings) const override;
|
virtual bool getRings(const std::string &txid, std::vector<std::pair<std::string, std::vector<uint64_t>>> &rings) const override;
|
||||||
|
|
|
@ -881,7 +881,10 @@ struct Wallet
|
||||||
virtual bool rescanSpent() = 0;
|
virtual bool rescanSpent() = 0;
|
||||||
|
|
||||||
//! blackballs a set of outputs
|
//! blackballs a set of outputs
|
||||||
virtual bool blackballOutputs(const std::vector<std::string> &pubkeys, bool add) = 0;
|
virtual bool blackballOutputs(const std::vector<std::string> &outputs, bool add) = 0;
|
||||||
|
|
||||||
|
//! blackballs an output
|
||||||
|
virtual bool blackballOutput(const std::string &amount, const std::string &offset) = 0;
|
||||||
|
|
||||||
//! unblackballs an output
|
//! unblackballs an output
|
||||||
virtual bool unblackballOutput(const std::string &amount, const std::string &offset) = 0;
|
virtual bool unblackballOutput(const std::string &amount, const std::string &offset) = 0;
|
||||||
|
|
Loading…
Reference in a new issue