Removed ref equality check
MODIFY
WalletWasabi.Tests/UnitTests/Transactions/TransactionProcessorTests.cs
WalletWasabi.Tests/UnitTests/Transactions/TransactionProcessorTests.cs
@@ -669,8 +669,8 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var matureTxs = transactionProcessor.TransactionStore.ConfirmedStore.GetTransactions().ToArray();
Assert.Empty(matureTxs);
- Assert.True(ReferenceEquals(tx2, spentCoin?.SpenderTransaction));
- Assert.False(ReferenceEquals(tx1, spentCoin?.SpenderTransaction));
+ Assert.Contains(spentCoin, tx1.WalletInputs);
+ Assert.Contains(spentCoin, tx2.WalletInputs);
}
[Fact]

MODIFY
WalletWasabi/Bases/NotifyPropertyChangedBase.cs
WalletWasabi/Bases/NotifyPropertyChangedBase.cs
@@ -27,18 +27,6 @@ namespace WalletWasabi.Bases
return true;
}
- protected bool RaiseAndSetIfRefChanged<T>(ref T field, ref T value, [CallerMemberName] string propertyName = null)
- {
- if (ReferenceEquals(field, value))
- {
- return false;
- }
-
- field = value;
- OnPropertyChanged(propertyName);
- return true;
- }
-
#endregion Events
}
}

MODIFY
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
@@ -77,11 +77,9 @@ namespace WalletWasabi.Blockchain.TransactionOutputs
{
get => _spenderTransaction;
set
- {
- if (RaiseAndSetIfRefChanged(ref _spenderTransaction, ref value))
{
value?.WalletInputs.Add(this);
- }
+ RaiseAndSetIfChanged(ref _spenderTransaction, value);
}
}

Removed ref equality check