Skip to content

Commit

Permalink
Remove Copy for flags parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
RCasatta committed May 1, 2021
1 parent 3aaa5d6 commit d1f4c0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/blockdata/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,9 @@ impl Transaction {
/// Verify that this transaction is able to spend its inputs
/// The lambda spent should not return the same TxOut twice!
pub fn verify_with_flags<S, F>(&self, mut spent: S, flags: F) -> Result<(), script::Error>
where S: FnMut(&OutPoint) -> Option<TxOut>, F : Into<u32> + Copy {
where S: FnMut(&OutPoint) -> Option<TxOut>, F : Into<u32> {
let tx = encode::serialize(&*self);
let flags: u32 = flags.into();
for (idx, input) in self.input.iter().enumerate() {
if let Some(output) = spent(&input.previous_output) {
output.script_pubkey.verify_with_flags(idx, output.value, tx.as_slice(), flags)?;
Expand Down

0 comments on commit d1f4c0a

Please sign in to comment.