From 6317a48bb98e4708860fdf830101113c8625bfa2 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Mon, 13 Jun 2022 21:46:32 +0200 Subject: [PATCH] Improved filtration of PoS-related transactions --- src/wallet/wallet2.cpp | 2 +- utils/test_api_files/get_recent_txs_and_info.json | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 utils/test_api_files/get_recent_txs_and_info.json diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 3ef8fb35..48218ead 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3285,7 +3285,7 @@ bool wallet2::is_consolidating_transaction(const wallet_public::wallet_transfer_ for (uint64_t r : wti.td.rcv){income += r;} uint64_t spend = 0; for (uint64_t s : wti.td.spn) { spend += s; } - if (get_tx_fee(wti.tx) + spend == income) + if (get_tx_fee(wti.tx) + income == spend) return true; } return false; diff --git a/utils/test_api_files/get_recent_txs_and_info.json b/utils/test_api_files/get_recent_txs_and_info.json new file mode 100644 index 00000000..b0187813 --- /dev/null +++ b/utils/test_api_files/get_recent_txs_and_info.json @@ -0,0 +1,13 @@ +{ + "jsonrpc": "2.0", + "id": 0, + "method": "get_recent_txs_and_info", + "params": { + "offset": 0, + "update_provision_info": true, + "exclude_mining_txs": true, + "count": 100, + "order": "FROM_BEGIN_TO_END", + "exclude_unconfirmed": true + } +} \ No newline at end of file