mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
ToHashSet
This commit is contained in:
@@ -181,7 +181,7 @@ namespace BTCPayServer.Controllers
|
|||||||
{
|
{
|
||||||
//check that all the inputs we provided are still there and that there is at least one new(signed) input.
|
//check that all the inputs we provided are still there and that there is at least one new(signed) input.
|
||||||
bool valid = false;
|
bool valid = false;
|
||||||
var existingInputs = psbt.Inputs.Select(input => input.PrevOut).ToList();
|
var existingInputs = psbt.Inputs.Select(input => input.PrevOut).ToHashSet();
|
||||||
foreach (var input in newPSBT.Inputs)
|
foreach (var input in newPSBT.Inputs)
|
||||||
{
|
{
|
||||||
var existingInput = existingInputs.SingleOrDefault(point => point == input.PrevOut);
|
var existingInput = existingInputs.SingleOrDefault(point => point == input.PrevOut);
|
||||||
|
|||||||
Reference in New Issue
Block a user