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

[Test] Unit tests for contract module #14

Merged
merged 1 commit into from
May 14, 2021
Merged

[Test] Unit tests for contract module #14

merged 1 commit into from
May 14, 2021

Conversation

mojoX911
Copy link
Contributor

This includes some preliminary unit test cases for contract module.

Note:

  • I have updated the read_locktime_from_contract() to read 8 byte i64 data, but I will cross verify with OP_CSV execution to write and read the correct data type from script.

  • I have added an read_pubkeys_from_contract_reedimscript() function as a helper, kept it because could be useful in future.

  • I have skipped the method calls including Wallet and Client, planning to cover them in detail in separate module tests.

Let me know if anything more needs to be added.

src/contracts.rs Outdated Show resolved Hide resolved
src/contracts.rs Outdated Show resolved Hide resolved
src/contracts.rs Outdated Show resolved Hide resolved
src/contracts.rs Outdated Show resolved Hide resolved
src/contracts.rs Outdated Show resolved Hide resolved
src/contracts.rs Outdated Show resolved Hide resolved
@chris-belcher
Copy link
Contributor

Thanks for this. I've left some small comments.

@mojoX911
Copy link
Contributor Author

Updated addressing the review comments.

Ready for next look.

src/contracts.rs Outdated Show resolved Hide resolved
@chris-belcher
Copy link
Contributor

Sorry for taking so long to get back to this. One more nit left, feel free to ignore. Afterwards squish the commits into one with a commit message following these rules: https://chris.beams.io/posts/git-commit/

@mojoX911
Copy link
Contributor Author

mojoX911 commented May 8, 2021

Thanks for the article. Really helpful. Updated as requested. Rebased and squashed.

@chris-belcher chris-belcher merged commit aa1a60b into bitcoin-teleport:master May 14, 2021
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