Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransactionFactory: Introduce TransactionParameters #11738

Merged

Conversation

kiminuo
Copy link
Collaborator

@kiminuo kiminuo commented Oct 18, 2023

Depends on #11737
Refactored #11709 (credits to Szpoti).

Note: This PR intentionally attempts not to modify tests.

@@ -48,10 +48,22 @@ public TransactionFactory(Network network, KeyManager keyManager, ICoinsView coi
IEnumerable<OutPoint>? allowedInputs = null,
IPayjoinClient? payjoinClient = null,
Func<LockTime>? lockTimeSelector = null,
bool allowUnconfirmed = true,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this method is called only from tests.

@kiminuo kiminuo force-pushed the feature/2023-10-18-TransactionParameters branch from f0ea40a to bb329e3 Compare October 19, 2023 06:33
@@ -65,15 +65,20 @@ public static BuildTransactionResult BuildTransaction(Wallet wallet, Transaction
label: transactionInfo.Recipient);

var network = keyManager.GetNetwork();
var builder = new TransactionFactory(network, keyManager, allCoins, new EmptyTransactionStore(network), password, true);
var builder = new TransactionFactory(network, keyManager, allCoins, new EmptyTransactionStore(network), password);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true -> L73 AllowUnconfirmed: true

Co-authored-by: Szpoti <balage.farago@gmail.com>
@kiminuo kiminuo force-pushed the feature/2023-10-18-TransactionParameters branch from bb329e3 to fa6f46e Compare October 19, 2023 06:48
Copy link
Collaborator

@Szpoti Szpoti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, more compact and much smaller approach.

@kiminuo kiminuo marked this pull request as ready for review October 19, 2023 08:22
@kiminuo kiminuo merged commit 7845c4a into WalletWasabi:master Oct 19, 2023
7 checks passed
@kiminuo kiminuo deleted the feature/2023-10-18-TransactionParameters branch October 19, 2023 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants