diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-10-02 22:38:09 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-10-02 22:45:48 +0200 |
commit | cf436cde1a480eddcdee7a0e68ddeea40ba93942 (patch) | |
tree | f385f5477c6e26efb2977d7c0875a87b34003aaa /src/wallet/api/wallet.cpp | |
parent | Merge pull request #4471 (diff) | |
download | monero-cf436cde1a480eddcdee7a0e68ddeea40ba93942.tar.xz |
Merge pull request #4475
6da36ea0 wallet2_api: blackball/unblackball now take two parameters (moneromooo-monero)
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r-- | src/wallet/api/wallet.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 3d4e981ea..236928348 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -2146,6 +2146,28 @@ bool WalletImpl::blackballOutputs(const std::vector<std::string> &outputs, bool 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) { uint64_t raw_amount, raw_offset; |