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

Use internal keys to collect coordinator's fee #12907

Closed

Conversation

adamPetho
Copy link
Collaborator

Fixes: #11406

Only one line changed, but please be very, very, very, very extra careful reviewing and merging this PR.

I want to either test it or write a test for this, but don't know how yet.

@adamPetho adamPetho changed the title Use internal keys to coordinator's fee Use internal keys to collect coordinator's fee Apr 19, 2024
@lontivero
Copy link
Collaborator

I think a test is not necessary. Anyway, if you want to write one then my recommendation is the following:

  • Create a TestWallet (it is a deterministic wallet)
  • Set the WabiSabiConfig.CoordinatorExtPubKey = testWallet.GetSegwitAccountExtPubKey()
  • Assert that WabiSabiConfig.DeriveCoordinatorScript(index).GetBitcoinAddress(ScriptPubKey.Segwit) == testWallet.CreateNewAddress(internal:true) in a for loop from index = 0 to 10 (or something like that=

@adamPetho adamPetho marked this pull request as ready for review April 29, 2024 09:58
@adamPetho
Copy link
Collaborator Author

Thank you @lontivero! I wrote a test just to be 110% sure.

@adamPetho adamPetho closed this May 2, 2024
@adamPetho adamPetho deleted the internal_address_for_coordinator branch May 2, 2024 09:35
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.

Use internal keys to collect coordinator's fee
2 participants