Drop paged retries from Monero Payments as those won't work anyway when transfer_split fails.
@@ -163,9 +163,7 @@ namespace MiningCore.Blockchain.Monero
var transferResponse = await walletDaemon.ExecuteCmdSingleAsync<TransferResponse>(MWC.Transfer, request);
// gracefully handle error -4 (transaction would be too large. try /transfer_split)
- if (transferResponse.Error?.Code == -4)
- {
- if (walletSupportsTransferSplit)
+ if (transferResponse.Error?.Code == -4 && walletSupportsTransferSplit)
{
logger.Info(() => $"[{LogCategory}] Retrying transfer using {MWC.TransferSplit}");
@@ -179,45 +177,6 @@ namespace MiningCore.Blockchain.Monero
}
}
- // retry paged
- logger.Info(() => $"[{LogCategory}] Retrying paged");
-
- var validBalances = balances.Where(x => x.Amount > 0).ToArray();
- var pageSize = 10;
- var pageCount = (int)Math.Ceiling((double)validBalances.Length / pageSize);
-
- for (var i = 0; i < pageCount; i++)
- {
- var page = validBalances
- .Skip(i * pageSize)
- .Take(pageSize)
- .ToArray();
-
- // update request
- request.Destinations = page
- .Where(x => x.Amount > 0)
- .Select(x =>
- {
- ExtractAddressAndPaymentId(x.Address, out var address, out var paymentId);
-
- return new TransferDestination
- {
- Address = address,
- Amount = (ulong) Math.Floor(x.Amount * MoneroConstants.SmallestUnit[poolConfig.Coin.Type])
- };
- }).ToArray();
-
- logger.Info(() => $"[{LogCategory}] Page {i + 1}: Paying out {FormatAmount(page.Sum(x => x.Amount))} to {page.Length} addresses");
-
- transferResponse = await walletDaemon.ExecuteCmdSingleAsync<TransferResponse>(MWC.Transfer, request);
- HandleTransferResponse(transferResponse, page);
-
- if (transferResponse.Error != null)
- break;
- }
- }
-
- else
HandleTransferResponse(transferResponse, balances);
}
