diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2022-08-07 15:00:16 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2022-09-06 18:25:48 +0000 |
commit | 5b98bebad146854cabf11b51bbd6ff5fafccbdcc (patch) | |
tree | 128d15f2cfcc332238704091a4029ef8881d85b4 /src | |
parent | wallet2: fix missing subaddress indices in "light" exported outputs (diff) | |
download | monero-5b98bebad146854cabf11b51bbd6ff5fafccbdcc.tar.xz |
wallet2: prevent importing outputs in a hot wallet
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index d87aa0e33..aba929855 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -13162,6 +13162,8 @@ size_t wallet2::import_outputs(const std::pair<uint64_t, std::vector<tools::wall { PERF_TIMER(import_outputs); + THROW_WALLET_EXCEPTION_IF(watch_only(), error::wallet_internal_error, "Hot wallets cannot import outputs"); + THROW_WALLET_EXCEPTION_IF(outputs.first > m_transfers.size(), error::wallet_internal_error, "Imported outputs omit more outputs that we know of"); |