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

Automated nightly rustfmt (2025-02-02) #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions bitcoin/src/crypto/sighash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -994,21 +994,22 @@ impl<R: Borrow<Transaction>> SighashCache<R> {
match sighash {
EcdsaSighashType::All => {
self_.output.consensus_encode(writer)?;
},
}
EcdsaSighashType::Single => {
// sign all outputs up to and including this one, but erase
// all of them except for this one
let count = input_index.min(self_.output.len() - 1);
writer.emit_compact_size(count + 1)?;
for _ in 0..count {
// consensus encoding of the "NULL txout" - max amount, empty script_pubkey
writer.write_all(&[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00])?;
writer
.write_all(&[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00])?;
}
self_.output[count].consensus_encode(writer)?;
},
}
EcdsaSighashType::None => {
writer.emit_compact_size(0u8)?;
},
}
_ => unreachable!(),
};
self_.lock_time.consensus_encode(writer)?;
Expand Down
1 change: 0 additions & 1 deletion primitives/src/locktime/absolute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ mod tests {
assert!(lock_by_time.is_satisfied_by(height, time_same));
assert!(lock_by_time.is_satisfied_by(height, time_after));
assert!(!lock_by_time.is_satisfied_by(height, time_before));

}

#[test]
Expand Down
1 change: 0 additions & 1 deletion primitives/src/script/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ impl<'a> Arbitrary<'a> for ScriptBuf {
}
}


#[cfg(test)]
mod tests {
use super::*;
Expand Down