Make sure we error if given a non-existant payment address

This commit is contained in:
Jason Rhinelander 2022-05-24 18:44:31 -03:00
parent 7b331131d9
commit 9a395be641
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
1 changed files with 5 additions and 0 deletions

View File

@ -498,6 +498,11 @@ namespace cryptonote {
db::exec_query(update_paid, payment.address, static_cast<int64_t>(amount), static_cast<int64_t>(block_height));
update_paid->reset();
}
else {
MERROR("Invalid amounts passed in to save payments for address: " << payment.address << ": that address has no accrued rewards");
return false;
}
select_sum->reset();
}
return true;