pub fn allow_shrinking(&mut self, script_pubkey: Script) -> Result<&mut Self, Error> {
        match self
            .params
            .recipients
            .iter()
            .position(|(recipient_script, _)| *recipient_script == script_pubkey)
        {
            Some(position) => {
                self.params.recipients.remove(position);
                self.params.drain_to = Some(script_pubkey);
                Ok(self)
            }
            None => Err(Error::Generic(format!(
                "{} was not in the original transaction",
                script_pubkey
            ))),
        }
    }
/// Explicitly tells the wallet that it is allowed to reduce the fee of the output matching this
/// `script_pubkey` in order to bump the transaction fee. Without specifying this the wallet
/// will attempt to find a change output to shrink instead.
///
/// **Note** that the output may shrink to below the dust limit and therefore be removed. If it is
/// preserved then it is currently not guaranteed to be in the same position as it was
/// originally.
///
/// Returns an `Err` if `script_pubkey` can't be found among the recipients of the
/// transaction we are bumping.
Explicitly tells the wallet that it is allowed to reduce the fee of the output matching this
`script_pubkey` in order to bump the transaction fee. Without specifying this the wallet
will attempt to find a change output to shrink instead.

Note** that the output may shrink to below the dust limit and therefore be removed. If it is
preserved then it is currently not guaranteed to be in the same position as it was
originally.

Returns an `Err` if `script_pubkey` can't be found among the recipients of the
transaction we are bumping.
Explicitly tells the wallet that it is allowed to reduce the fee of the output matching this ` script_pubkey ` in order to bump the transaction fee . Without specifying this the wallet will attempt to find a change output to shrink instead . Note ** that the output may shrink to below the dust limit and therefore be removed . If it is preserved then it is currently not guaranteed to be in the same position as it was originally . Returns an ` Err ` if ` script_pubkey ` can ' t be found among the recipients of the transaction we are bumping .
pub fn allow_shrinking(&mut self, script_pubkey: Script) -> Result<&mut Self, Error> {
        match self
            .params
            .recipients
            .iter()
            .position(|(recipient_script, _)| *recipient_script == script_pubkey)
        {
            Some(position) => {
                self.params.recipients.remove(position);
                self.params.drain_to = Some(script_pubkey);
                Ok(self)
            }
            None => Err(Error::Generic(format!(
                "{} was not in the original transaction",
                script_pubkey
            ))),
        }
    }
pub fn allow_shrinking ( & mut self , script_pubkey : Script ) -> Result < & mut Self , Error > { match self . params . recipients . iter ( ) . position ( | ( recipient_script , _ ) | * recipient_script == script_pubkey ) { Some ( position ) => { self . params . recipients . remove ( position ) ; self . params . drain_to = Some ( script_pubkey ) ; Ok ( self ) } None => Err ( Error :: Generic ( format ! ( " " script_pubkey ) ) ) , } }
Explicitly tells the wallet that it is allowed to reduce the fee of the output matching this
`script_pubkey` in order to bump the transaction fee.
Explicitly tells the wallet that it is allowed to reduce the fee of the output matching this ` script_pubkey ` in order to bump the transaction fee .
&mut self
script_pubkey
Script
&mut self
script_pubkey
Script