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 simple peginv1 test #106

Merged

Conversation

jeremy-then
Copy link
Contributor

No description provided.

@jeremy-then jeremy-then self-assigned this Oct 2, 2024
@jeremy-then jeremy-then requested a review from a team as a code owner October 2, 2024 18:20
Base automatically changed from remove-test-with-multiple-inputs to rits-refactors-9-2024-integration October 2, 2024 18:23
lib/tests/2wp.js Outdated

// Assert

const expectedCountOfThisPeginUtxosInTheBridge = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe this could be the default value for the param in ensurePeginIsRegistered? What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is. I just wanted to express it explicitly here. I can remove it and use it like this for multiple utxos.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

const expectedCountOfThisPeginUtxosInTheBridge = 1;
await ensurePeginIsRegistered(rskTxHelper, btcPeginTxHash, expectedCountOfThisPeginUtxosInTheBridge);

const expectedPeginProtocolVersion = '1';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It defaults to '0', at the createExpectedPeginBtcEvent level.

@@ -105,13 +106,54 @@ const execute = (description, getRskHost) => {

});

it('should do a basic pegin v1 with the exact minimum value', async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if it's under your radar. But we should also have some tests that add the btc refund address to the op return payload.

Nothing will change since there won't be a refund, but we should check that the peg-in still works when we add that data.

And then some tests with invalid payloads, including invalid refund address data

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

Copy link

sonarqubecloud bot commented Oct 2, 2024

@marcos-iov marcos-iov merged commit 32eedde into rits-refactors-9-2024-integration Oct 2, 2024
5 checks passed
@marcos-iov marcos-iov deleted the add-simple-peginv1-test branch October 2, 2024 20:09
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