Skip to content

PSBT types are now constants#530

Merged
stevenroose merged 2 commits intorust-bitcoin:masterfrom
BP-WG:psbt/constants
Dec 15, 2020
Merged

PSBT types are now constants#530
stevenroose merged 2 commits intorust-bitcoin:masterfrom
BP-WG:psbt/constants

Conversation

@dr-orlovsky
Copy link
Copy Markdown
Collaborator

@dr-orlovsky dr-orlovsky commented Dec 5, 2020

This does not create any external API changes, but is useful for code readability, internal consistency & future work, preventing from typos-type mistakes etc.

Part of PSBT/BIP32 refactoring epic #473

/// Type: Finalized scriptWitness PSBT_IN_FINAL_SCRIPTWITNESS = 0x08
const PSBT_IN_FINAL_SCRIPTWITNESS: u8 = 0x08;
/// Type: RIPEMD160 preimage
const PSBT_IN_RIPEMD160_PREIMAGES: u8 = 0x0a;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should drop the _PREIMAGES suffix here to match the BIP.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Correct, doing that

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done with a separate commit to simplify the review (what's changed)

@dr-orlovsky dr-orlovsky requested a review from apoelstra December 7, 2020 15:36
Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ack 881f4d7

@justinmoon
Copy link
Copy Markdown

ACK 881f4d7

Copy link
Copy Markdown
Contributor

@sgeisler sgeisler left a comment

Choose a reason for hiding this comment

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

ack 881f4d7

Copy link
Copy Markdown
Collaborator

@stevenroose stevenroose left a comment

Choose a reason for hiding this comment

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

utACK 881f4d7

@stevenroose stevenroose merged commit 6df16b7 into rust-bitcoin:master Dec 15, 2020
@dr-orlovsky dr-orlovsky mentioned this pull request Dec 15, 2020
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.

6 participants