mirror of https://github.com/oxen-io/oxen-core.git
Don't include sub-atomic rows in get_all_accrued_earnings
The RPC call to return accrued balances currently returns some 0s, because the database has sub-atomic (but non-zero) stored amounts. This commit skips those when querying accrued earnings.
This commit is contained in:
parent
b4062f37bb
commit
e1c1677c0a
|
@ -240,8 +240,11 @@ namespace cryptonote {
|
|||
|
||||
for (auto [addr, amt] : prepared_results<std::string, int64_t>(
|
||||
"SELECT address, amount FROM batched_payments_accrued")) {
|
||||
addresses.push_back(std::move(addr));
|
||||
amounts.push_back(static_cast<uint64_t>(amt / 1000));
|
||||
auto amount = static_cast<uint64_t>(amt / 1000);
|
||||
if (amount > 0) {
|
||||
addresses.push_back(std::move(addr));
|
||||
amounts.push_back(amount);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue