mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
simplewallet: bug fix for backlog estimate
This commit is contained in:
parent
2f5a9b6bb3
commit
c903df5ece
1 changed files with 1 additions and 4 deletions
|
@ -3854,7 +3854,6 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
|
||||||
{
|
{
|
||||||
std::stringstream prompt;
|
std::stringstream prompt;
|
||||||
double worst_fee_per_byte = std::numeric_limits<double>::max();
|
double worst_fee_per_byte = std::numeric_limits<double>::max();
|
||||||
uint64_t size = 0, fee = 0;
|
|
||||||
for (size_t n = 0; n < ptx_vector.size(); ++n)
|
for (size_t n = 0; n < ptx_vector.size(); ++n)
|
||||||
{
|
{
|
||||||
const uint64_t blob_size = cryptonote::tx_to_blob(ptx_vector[n].tx).size();
|
const uint64_t blob_size = cryptonote::tx_to_blob(ptx_vector[n].tx).size();
|
||||||
|
@ -3862,13 +3861,11 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
|
||||||
if (fee_per_byte < worst_fee_per_byte)
|
if (fee_per_byte < worst_fee_per_byte)
|
||||||
{
|
{
|
||||||
worst_fee_per_byte = fee_per_byte;
|
worst_fee_per_byte = fee_per_byte;
|
||||||
fee = ptx_vector[n].fee;
|
|
||||||
}
|
}
|
||||||
size += blob_size;
|
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
std::vector<std::pair<uint64_t, uint64_t>> nblocks = m_wallet->estimate_backlog(size, size, {fee});
|
std::vector<std::pair<uint64_t, uint64_t>> nblocks = m_wallet->estimate_backlog({std::make_pair(worst_fee_per_byte, worst_fee_per_byte)});
|
||||||
if (nblocks.size() != 1)
|
if (nblocks.size() != 1)
|
||||||
{
|
{
|
||||||
prompt << "Internal error checking for backlog. " << tr("Is this okay anyway? (Y/Yes/N/No): ");
|
prompt << "Internal error checking for backlog. " << tr("Is this okay anyway? (Y/Yes/N/No): ");
|
||||||
|
|
Loading…
Reference in a new issue