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

Adds missing migration test #225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeremy-then
Copy link
Contributor

There was a missing test in the new federation change tests: a migration utxo test. This pr adds it.

@jeremy-then jeremy-then self-assigned this Feb 8, 2025
@jeremy-then jeremy-then requested a review from a team as a code owner February 8, 2025 04:04
Copy link

sonarqubecloud bot commented Feb 8, 2025

@@ -25,28 +25,36 @@ async function clearLogFiles(directory) {
}
}

function deleteBitcoinDataDirectory() {
function clearBitcoinDataDirectory() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored this utility to delete all files and directory inside the bitcoin data directory, but not the bitcoin data directory itself.

@@ -120,6 +133,17 @@ const execute = (description, newFederationConfig) => {
await btcTxHelper.importAddress(initialFederationAddress, 'federations');
await btcTxHelper.importAddress(expectedNewFederationAddress, 'federations');

minimumPeginValueInSatoshis = Number(await bridge.methods.getMinimumLockTxValue().call());

if(makeDonationPegins) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ideal for the first federation change when there is no utxo in the Bridge yet.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than adding this logic here, I would maybe put it in tests/00_00_05-change-federation.js before calling this file. Or could be a file prior, a test of it's own that only sends some UTXOs to the Bridge.

It's probably better organized that way, and we don't add logic here that only applies for one case

Base automatically changed from rits-refactors-9-2024-integration to main February 24, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants