Removes scriptPubkey length checks
MODIFY
WalletWasabi/Models/ChaumianCoinJoin/Alice.cs
WalletWasabi/Models/ChaumianCoinJoin/Alice.cs
@@ -35,14 +35,7 @@ namespace WalletWasabi.Models.ChaumianCoinJoin
NetworkFeeToPay = Guard.NotNull(nameof(networkFeeToPay), networkFeeToPay);
BlindedOutputScriptHex = Guard.NotNullOrEmptyOrWhitespace(nameof(blindedOutputScriptHex), blindedOutputScriptHex);
- Guard.NotNull(nameof(changeOutputAddress), changeOutputAddress);
- // 33 bytes maximum: https://bitcoin.stackexchange.com/a/46379/26859
- int byteCount = changeOutputAddress.ScriptPubKey.ToBytes().Length;
- if (byteCount > 33)
- {
- throw new ArgumentOutOfRangeException(nameof(changeOutputAddress), byteCount, $"Can be maximum 33 bytes.");
- }
- ChangeOutputAddress = changeOutputAddress;
+ ChangeOutputAddress = Guard.NotNull(nameof(changeOutputAddress), changeOutputAddress);
LastSeen = DateTimeOffset.UtcNow;
UniqueId = Guid.NewGuid();

MODIFY
WalletWasabi/Models/ChaumianCoinJoin/Bob.cs
WalletWasabi/Models/ChaumianCoinJoin/Bob.cs
@@ -12,14 +12,7 @@ namespace WalletWasabi.Models.ChaumianCoinJoin
public Bob(BitcoinAddress activeOutputAddress)
{
- Guard.NotNull(nameof(activeOutputAddress), activeOutputAddress);
- // 33 bytes maximum: https://bitcoin.stackexchange.com/a/46379/26859
- int byteCount = activeOutputAddress.ScriptPubKey.ToBytes().Length;
- if (byteCount > 33)
- {
- throw new ArgumentOutOfRangeException(nameof(activeOutputAddress), byteCount, $"Can be maximum 33 bytes.");
- }
- ActiveOutputAddress = activeOutputAddress;
+ ActiveOutputAddress = Guard.NotNull(nameof(activeOutputAddress), activeOutputAddress);
}
}
}

Removes scriptPubkey length checks