Skip to content

Conversation

@roconnor-blockstream
Copy link
Contributor

This also includes a slightly refactored version of PR #41.

Copy link
Contributor

@meshcollider meshcollider left a comment

Choose a reason for hiding this comment

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

Looks good, haven't checked the tests.

then guard (length witprog == 20 || length witprog == 32) >> return 1
else guard (length witprog >= 2 && length witprog <= 40) >> return bech32mConst
where
bech32mConst = 0x2bc830a3
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be nice to define a global sum type for the two encoding types and have a mapping function from encoding to checksum constant. Then it can be exported to the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@roconnor-blockstream
Copy link
Contributor Author

I've added two commits which I will squash afterwards.

@meshcollider
Copy link
Contributor

utACK 7736efe

@roconnor-blockstream
Copy link
Contributor Author

squashed some commits.

@meshcollider
Copy link
Contributor

meshcollider commented Jan 20, 2022

re-ACK 7d25521, no changes in squash

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.

4 participants