Skip to content

Commit

Permalink
Merge pull request #48 from zoedberg/fix/opreturn_commitment
Browse files Browse the repository at this point in the history
Fixes for OPRET commitment
  • Loading branch information
dr-orlovsky authored Jul 30, 2022
2 parents 812c0e3 + 1a61def commit a96b0a7
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit a96b0a7

Please sign in to comment.