Skip to content

Commit 967b58d

Browse files
committed
Merge rust-bitcoin#1810: Spelling and typo fixes
20b812d Spelling and typo fixes (yancy) Pull request description: Fix some types in Transaction.rs and encode.rs ACKs for top commit: apoelstra: ACK 20b812d Kixunil: ACK 20b812d tcharding: ACK 20b812d Tree-SHA512: d613189932ecb760be385c4095723501222cc8cec8b25525b58f76f9486d33fe46ab241bd2c098ea141f0fd12bb52abc677eba4a0cf3fe5b40b515bd75c7237c
2 parents 84a075d + 20b812d commit 967b58d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

bitcoin/src/blockdata/transaction.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ impl core::str::FromStr for OutPoint {
183183
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
184184
#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))]
185185
pub struct TxIn {
186-
/// The reference to the previous output that is being used an an input.
186+
/// The reference to the previous output that is being used as an input.
187187
pub previous_output: OutPoint,
188188
/// The script which pushes values on the stack which will cause
189189
/// the referenced output's script to be accepted.
190190
pub script_sig: ScriptBuf,
191191
/// The sequence number, which suggests to miners which of two
192192
/// conflicting transactions should be preferred, or 0xFFFFFFFF
193193
/// to ignore this feature. This is generally never used since
194-
/// the miner behaviour cannot be enforced.
194+
/// the miner behavior cannot be enforced.
195195
pub sequence: Sequence,
196196
/// Witness data: an array of byte-arrays.
197197
/// Note that this field is *not* (de)serialized with the rest of the TxIn in
@@ -230,7 +230,7 @@ impl TxIn {
230230
(36 + VarInt(script_sig_size as u64).len() + script_sig_size + 4) * 4
231231
}
232232

233-
/// The weight of the TxIn when it's included in a segwit transaction (i.e., a transcation
233+
/// The weight of the TxIn when it's included in a segwit transaction (i.e., a transaction
234234
/// having at least one segwit input).
235235
///
236236
/// This always takes into account the witness, even when empty, in which
@@ -261,7 +261,7 @@ impl Default for TxIn {
261261
/// - Indicating whether absolute lock-time (specified in `lock_time` field of [`Transaction`])
262262
/// is enabled.
263263
/// - Indicating and encoding [BIP-68] relative lock-times.
264-
/// - Indicating whether a transcation opts-in to [BIP-125] replace-by-fee.
264+
/// - Indicating whether a transaction opts-in to [BIP-125] replace-by-fee.
265265
///
266266
/// Note that transactions spending an output with `OP_CHECKLOCKTIMEVERIFY`MUST NOT use
267267
/// `Sequence::MAX` for the corresponding input. [BIP-65]
@@ -353,7 +353,7 @@ impl Sequence {
353353
self.is_relative_lock_time() & (self.0 & Sequence::LOCK_TYPE_MASK == 0)
354354
}
355355

356-
/// Returns `true` if the sequene number encodes a time interval based relative lock-time.
356+
/// Returns `true` if the sequence number encodes a time interval based relative lock-time.
357357
#[inline]
358358
pub fn is_time_locked(&self) -> bool {
359359
self.is_relative_lock_time() & (self.0 & Sequence::LOCK_TYPE_MASK > 0)

bitcoin/src/consensus/encode.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ pub trait Decodable: Sized {
276276
/// Like `consensus_decode` but relies on the reader being limited in the amount of data it
277277
/// returns, e.g. by being wrapped in [`std::io::Take`].
278278
///
279-
/// Failling to obide to this requirement might lead to memory exhaustion caused by malicious
279+
/// Failing to abide to this requirement might lead to memory exhaustion caused by malicious
280280
/// inputs.
281281
///
282282
/// Users should default to `consensus_decode`, but when data to be decoded is already in a byte
@@ -572,7 +572,7 @@ macro_rules! impl_vec {
572572
r: &mut R,
573573
) -> Result<Self, Error> {
574574
let len = VarInt::consensus_decode_from_finite_reader(r)?.0;
575-
// Do not allocate upfront more items than if the sequnce of type
575+
// Do not allocate upfront more items than if the sequence of type
576576
// occupied roughly quarter a block. This should never be the case
577577
// for normal data, but even if that's not true - `push` will just
578578
// reallocate.

0 commit comments

Comments
 (0)