Rename method and move public methods to be first.
MODIFY
WalletWasabi/Blockchain/BlockFilters/FilterProcessor.cs
WalletWasabi/Blockchain/BlockFilters/FilterProcessor.cs
@@ -26,7 +26,7 @@ public class FilterProcessor
using (await AsyncLock.LockAsync().ConfigureAwait(false))
{
var hashChain = BitcoinStore.SmartHeaderChain;
- hashChain.UpdateServerTipHeight(serverBestHeight);
+ hashChain.SetServerTipHeight(serverBestHeight);
if (filtersResponseState == FiltersResponseState.NewFilters)
{

MODIFY
WalletWasabi/Blockchain/Blocks/SmartHeaderChain.cs
WalletWasabi/Blockchain/Blocks/SmartHeaderChain.cs
@@ -123,22 +123,6 @@ public class SmartHeaderChain
}
}
- /// <remarks>Guarded by <see cref="Lock"/>.</remarks>
- private void SetTipNoLock(SmartHeader? tip)
- {
- _tip = tip;
- _tipHeight = tip?.Height ?? default;
- _tipHash = tip?.BlockHash;
- _hashesCount = Chain?.Count ?? default;
- SetHashesLeftNoLock();
- }
-
- /// <remarks>Guarded by <see cref="Lock"/>.</remarks>
- private void SetHashesLeftNoLock()
- {
- _hashesLeft = (int)Math.Max(0, (long)_serverTipHeight - _tipHeight);
- }
-
public bool RemoveTip()
{
bool result = false;
@@ -159,7 +143,7 @@ public class SmartHeaderChain
return result;
}
- public void UpdateServerTipHeight(uint height)
+ public void SetServerTipHeight(uint height)
{
lock (Lock)
{
@@ -176,4 +160,20 @@ public class SmartHeaderChain
return Chain.Select(x => (x.Height, x)).ToArray();
}
}
+
+ /// <remarks>Guarded by <see cref="Lock"/>.</remarks>
+ private void SetTipNoLock(SmartHeader? tip)
+ {
+ _tip = tip;
+ _tipHeight = tip?.Height ?? default;
+ _tipHash = tip?.BlockHash;
+ _hashesCount = Chain?.Count ?? default;
+ SetHashesLeftNoLock();
+ }
+
+ /// <remarks>Guarded by <see cref="Lock"/>.</remarks>
+ private void SetHashesLeftNoLock()
+ {
+ _hashesLeft = (int)Math.Max(0, (long)_serverTipHeight - _tipHeight);
+ }
}

Rename method and move public methods to be first.