Skip to content

Commit

Permalink
Merge pull request #12724 from adamPetho/optimize_number_of_parent_txs
Browse files Browse the repository at this point in the history
Remove duplicates before fetching parent TXs
  • Loading branch information
turbolay committed Mar 26, 2024
2 parents 32923c4 + d10f310 commit 89c87d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WalletWasabi.Backend/Controllers/BlockchainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ private async Task<UnconfirmedTransactionChainItem> ComputeUnconfirmedTransactio
{
var currentTx = (await FetchTransactionsAsync([currentTxId], cancellationToken).ConfigureAwait(false)).FirstOrDefault() ?? throw new InvalidOperationException("Tx not found");

var txsToFetch = currentTx.Inputs.Select(input => input.PrevOut.Hash).ToArray();
var txsToFetch = currentTx.Inputs.Select(input => input.PrevOut.Hash).Distinct().ToArray();

var parentTxs = await FetchTransactionsAsync(txsToFetch, cancellationToken).ConfigureAwait(false);

Expand Down

0 comments on commit 89c87d6

Please sign in to comment.