More consistent variable/param naming
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Client/ArenaClientTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Client/ArenaClientTests.cs
@@ -55,14 +55,14 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
var inputRegistrationResponse = await aliceArenaClient.RegisterInputAsync(outpoint, key, round.Id, CancellationToken.None);
var aliceId = inputRegistrationResponse.Value;
- var reissuanceAmounts = new[]
+ var amountsToRequest = new[]
{
Money.Coins(.75m) - round.FeeRate.GetFee(Constants.P2wpkhInputVirtualSize),
Money.Coins(.25m)
};
var inputVsize = Constants.P2wpkhInputVirtualSize;
- var inputRemainingVsizes = new[] { ProtocolConstants.MaxVsizePerAlice - inputVsize };
+ var vsizesToRequest = new[] { ProtocolConstants.MaxVsizePerAlice - inputVsize };
// Phase: Input Registration
Assert.Equal(Phase.InputRegistration, round.Phase);
@@ -70,8 +70,8 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
var connectionConfirmationResponse1 = await aliceArenaClient.ConfirmConnectionAsync(
round.Id,
aliceId,
- reissuanceAmounts,
- inputRemainingVsizes,
+ amountsToRequest,
+ vsizesToRequest,
inputRegistrationResponse.RealAmountCredentials,
inputRegistrationResponse.RealVsizeCredentials,
CancellationToken.None);
@@ -83,8 +83,8 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
var connectionConfirmationResponse2 = await aliceArenaClient.ConfirmConnectionAsync(
round.Id,
aliceId,
- reissuanceAmounts,
- inputRemainingVsizes,
+ amountsToRequest,
+ vsizesToRequest,
connectionConfirmationResponse1.RealAmountCredentials,
connectionConfirmationResponse1.RealVsizeCredentials,
CancellationToken.None);
@@ -100,9 +100,9 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
var reissuanceResponse = await bobArenaClient.ReissueCredentialAsync(
round.Id,
- reissuanceAmounts[0],
+ amountsToRequest[0],
destinationKey1.PubKey.WitHash.ScriptPubKey,
- reissuanceAmounts[1],
+ amountsToRequest[1],
destinationKey2.PubKey.WitHash.ScriptPubKey,
connectionConfirmationResponse2.RealAmountCredentials,
connectionConfirmationResponse2.RealVsizeCredentials,
@@ -116,7 +116,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
await bobArenaClient.RegisterOutputAsync(
round.Id,
- reissuanceAmounts[0],
+ amountsToRequest[0],
destinationKey1.PubKey.WitHash.ScriptPubKey,
new[] { amountCred1 },
new[] { vsizeCred1 },
@@ -124,7 +124,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
await bobArenaClient.RegisterOutputAsync(
round.Id,
- reissuanceAmounts[1],
+ amountsToRequest[1],
destinationKey2.PubKey.WitHash.ScriptPubKey,
new[] { amountCred2 },
new[] { vsizeCred2 },

MODIFY
WalletWasabi/WabiSabi/Client/AliceClient.cs
WalletWasabi/WabiSabi/Client/AliceClient.cs
@@ -57,7 +57,7 @@ namespace WalletWasabi.WabiSabi.Client
private async Task<bool> TryConfirmConnectionAsync(CancellationToken cancellationToken)
{
var inputVsize = Constants.P2wpkhInputVirtualSize;
- var inputRemainingVsizes = new[] { ProtocolConstants.MaxVsizePerAlice - inputVsize };
+ var vsizesToRequest = new[] { ProtocolConstants.MaxVsizePerAlice - inputVsize };
var totalFeeToPay = FeeRate.GetFee(Coin.ScriptPubKey.EstimateInputVsize());
var totalAmount = Coin.Amount;
@@ -75,7 +75,7 @@ namespace WalletWasabi.WabiSabi.Client
RoundId,
AliceId,
amountsToRequest,
- inputRemainingVsizes,
+ vsizesToRequest,
RealAmountCredentials,
RealVsizeCredentials,
cancellationToken)

MODIFY
WalletWasabi/WabiSabi/Client/ArenaClient.cs
WalletWasabi/WabiSabi/Client/ArenaClient.cs
@@ -162,24 +162,24 @@ namespace WalletWasabi.WabiSabi.Client
public async Task<ArenaResponse<bool>> ConfirmConnectionAsync(
uint256 roundId,
uint256 aliceId,
- IEnumerable<Money> newAmount,
- IEnumerable<long> inputsRegistrationVsize,
+ IEnumerable<Money> amountsToRequest,
+ IEnumerable<long> vsizesToRequest,
IEnumerable<Credential> amountCredentialsToPresent,
IEnumerable<Credential> vsizeCredentialsToPresent,
CancellationToken cancellationToken)
{
- Guard.InRange(nameof(newAmount), newAmount, 1, ProtocolConstants.CredentialNumber);
+ Guard.InRange(nameof(amountsToRequest), amountsToRequest, 1, ProtocolConstants.CredentialNumber);
Guard.InRange(nameof(amountCredentialsToPresent), amountCredentialsToPresent, 0, ProtocolConstants.CredentialNumber);
Guard.InRange(nameof(vsizeCredentialsToPresent), vsizeCredentialsToPresent, 0, ProtocolConstants.CredentialNumber);
- Guard.InRange(nameof(inputsRegistrationVsize), inputsRegistrationVsize, 1, VsizeCredentialClient.NumberOfCredentials);
+ Guard.InRange(nameof(vsizesToRequest), vsizesToRequest, 1, VsizeCredentialClient.NumberOfCredentials);
var realAmountCredentialRequestData = AmountCredentialClient.CreateRequest(
- newAmount.Select(x => x.Satoshi),
+ amountsToRequest.Select(x => x.Satoshi),
amountCredentialsToPresent,
cancellationToken);
var realVsizeCredentialRequestData = VsizeCredentialClient.CreateRequest(
- inputsRegistrationVsize,
+ vsizesToRequest,
vsizeCredentialsToPresent,
cancellationToken);

More consistent variable/param naming