diff options
| author | tobtoht <tob@featherwallet.org> | 2026-06-21 11:38:35 +0000 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2026-06-21 11:38:35 +0000 |
| commit | bb858a6aff0410b6ef102010e3ea42ad6db11d70 (patch) | |
| tree | 5360bbc174877d5e48769423179d0c0ad2051b91 | |
| parent | fc46361376a6f3a604df7ae84ddda848d43dd6cc (diff) | |
| parent | b99d15f08d80a8cad6dee88628192ba0411544fb (diff) | |
| download | monzero-core-bb858a6aff0410b6ef102010e3ea42ad6db11d70.tar.gz monzero-core-bb858a6aff0410b6ef102010e3ea42ad6db11d70.tar.xz monzero-core-bb858a6aff0410b6ef102010e3ea42ad6db11d70.zip | |
Merge pull request #10773
b99d15f wallet2: reject non-monotonic rct output distributions (selsta)
ACKs: jeffro256, vtnerd
| -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 e2aa2b201..8a74e711c 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -9285,6 +9285,8 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>> // check we're clear enough of rct start, to avoid corner cases below THROW_WALLET_EXCEPTION_IF(rct_offsets.size() <= CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE, error::get_output_distribution, "Not enough rct outputs"); + THROW_WALLET_EXCEPTION_IF(!std::is_sorted(rct_offsets.begin(), rct_offsets.end()), + error::get_output_distribution, "Daemon reports non-monotonic rct output distribution"); THROW_WALLET_EXCEPTION_IF(rct_offsets.back() <= max_rct_index, error::get_output_distribution, "Daemon reports suspicious number of rct outputs"); } |
