Update Height if it's believable.
MODIFY
WalletWasabi.Tests/IntegrationTests/RegTests.cs
WalletWasabi.Tests/IntegrationTests/RegTests.cs
@@ -1031,7 +1031,8 @@ namespace WalletWasabi.Tests.IntegrationTests
await broadcaster.SendTransactionAsync(res.Transaction);
- IEnumerable<string> unconfirmedCoinLabels = wallet.Coins.Where(x => x.Height == Height.Mempool).SelectMany(x => x.Label.Labels);
+ IEnumerable<SmartCoin> unconfirmedCoins = wallet.Coins.Where(x => x.Height == Height.Mempool).ToArray();
+ IEnumerable<string> unconfirmedCoinLabels = unconfirmedCoins.SelectMany(x => x.Label.Labels).ToArray();
Assert.Contains("outgoing", unconfirmedCoinLabels);
Assert.Contains("outgoing2", unconfirmedCoinLabels);
IEnumerable<string> allKeyLabels = keyManager.GetKeys().SelectMany(x => x.Label.Labels);
@@ -2427,6 +2428,7 @@ namespace WalletWasabi.Tests.IntegrationTests
Assert.Contains(unsignedCoinJoin.GetHash(), syncInfo.UnconfirmedCoinJoins);
var txs = await wasabiClient.GetTransactionsAsync(network, new[] { unsignedCoinJoin.GetHash() }, CancellationToken.None);
Assert.NotEmpty(txs);
+
#endregion PostSignatures
}
}

MODIFY
WalletWasabi/Blockchain/TransactionBroadcasting/TransactionBroadcaster.cs
WalletWasabi/Blockchain/TransactionBroadcasting/TransactionBroadcaster.cs
@@ -135,6 +135,11 @@ namespace WalletWasabi.Blockchain.TransactionBroadcasting
private void BelieveTransaction(SmartTransaction transaction)
{
+ if (transaction.Height == Height.Unknown)
+ {
+ transaction.SetUnconfirmed();
+ }
+
lock (WalletServicesLock)
{
foreach (var walletService in AliveWalletServices)

MODIFY
WalletWasabi/Blockchain/Transactions/SmartTransaction.cs
WalletWasabi/Blockchain/Transactions/SmartTransaction.cs
@@ -172,17 +172,11 @@ namespace WalletWasabi.Blockchain.Transactions
});
}
- public bool SetUnconfirmed()
+ public void SetUnconfirmed()
{
- if (!Confirmed)
- {
- return false;
- }
-
Height = Height.Mempool;
BlockHash = null;
BlockIndex = 0;
- return true;
}
#region LineSerialization

Update Height if it's believable.