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

Fixes for OPRET commitment #48

Merged
merged 1 commit into from
Jul 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions psbt/src/commit/opret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub trait ProprietaryKeyOpret {

impl ProprietaryKeyOpret for ProprietaryKey {}

/// Errors processing tapret-related proprietary PSBT keys and their values.
/// Errors processing opret-related proprietary PSBT keys and their values.
#[derive(
Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display, Error
)]
Expand Down Expand Up @@ -97,7 +97,7 @@ impl Output {
///
/// If output script is not OP_RETURN script
#[inline]
pub fn set_tapret_host(&mut self) -> Result<bool, OpretKeyError> {
pub fn set_opret_host(&mut self) -> Result<bool, OpretKeyError> {
if !self.script.is_op_return() {
return Err(OpretKeyError::NonOpReturnOutput);
}
Expand Down Expand Up @@ -151,7 +151,7 @@ impl Output {
.and_then(Slice32::from_slice))
}

/// Assigns value of the tapreturn commitment to this PSBT output, by
/// Assigns value of the opreturn commitment to this PSBT output, by
/// adding [`PSBT_OUT_OPRET_COMMITMENT`] proprietary key containing the
/// 32-byte commitment as its value.
///
Expand All @@ -166,7 +166,7 @@ impl Output {
&mut self,
commitment: impl Into<[u8; 32]>,
) -> Result<(), OpretKeyError> {
if !self.is_tapret_host() {
if !self.is_opret_host() {
return Err(OpretKeyError::OpretProhibited);
}

Expand Down