Skip to content

Commit

Permalink
fix: nasty pointer bug in the new code
Browse files Browse the repository at this point in the history
  • Loading branch information
jadwahab committed Apr 9, 2023
1 parent b6c7e64 commit a64b4a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ord/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func AcceptOrdinalSaleListing(ctx context.Context, vla *ValidateListingArgs, aso
for i, u := range asoa.UTXOs {
if u.Satoshis > sellerOutput.Satoshis {
// Move the UTXO at index i to the beginning
asoa.UTXOs = append([]*bt.UTXO{asoa.UTXOs[i]}, append(asoa.UTXOs[:i], asoa.UTXOs[i+1:]...)...)
asoa.UTXOs = append([]*bt.UTXO{u}, append(asoa.UTXOs[:i], asoa.UTXOs[i+1:]...)...)
validUTXOFound = true
break
}
Expand Down Expand Up @@ -161,7 +161,7 @@ func AcceptOrdinalSaleListing(ctx context.Context, vla *ValidateListingArgs, aso
return nil, err
}

//nolint:dupl // false positive
//nolint:dupl // TODO: are 2 dummies useful or to be removed?
for i, u := range asoa.UTXOs {
// skip 2nd input (ordinals input)
j := i
Expand Down

0 comments on commit a64b4a0

Please sign in to comment.