Skip to content

Commit 9914169

Browse files
committed
remove some deprecated weight-related methods
1 parent 710f595 commit 9914169

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

src/block.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,6 @@ impl Block {
364364
self.header.block_hash()
365365
}
366366

367-
/// Get the size of the block
368-
#[deprecated(since = "0.19.1", note = "Please use `Block::size` instead.")]
369-
pub fn get_size(&self) -> usize {
370-
self.size()
371-
}
372-
373367
/// Get the size of the block
374368
pub fn size(&self) -> usize {
375369
// The size of the header + the size of the varint with the tx count + the txs themselves
@@ -378,12 +372,6 @@ impl Block {
378372
base_size + txs_size
379373
}
380374

381-
/// Get the weight of the block
382-
#[deprecated(since = "0.19.1", note = "Please use `Block::weight` instead.")]
383-
pub fn get_weight(&self) -> usize {
384-
self.weight()
385-
}
386-
387375
/// Get the weight of the block
388376
pub fn weight(&self) -> usize {
389377
let base_weight = 4 * (serialize(&self.header).len() + VarInt(self.txdata.len() as u64).size());

src/transaction.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -896,25 +896,12 @@ impl Transaction {
896896
self.output.iter().any(|o| !o.witness.is_empty())
897897
}
898898

899-
/// Get the "weight" of this transaction; roughly equivalent to BIP141, in that witness data is
900-
/// counted as 1 while non-witness data is counted as 4.
901-
#[deprecated(since = "0.19.1", note = "Please use `Transaction::weight` instead.")]
902-
pub fn get_weight(&self) -> usize {
903-
self.weight()
904-
}
905-
906899
/// Get the "weight" of this transaction; roughly equivalent to BIP141, in that witness data is
907900
/// counted as 1 while non-witness data is counted as 4.
908901
pub fn weight(&self) -> usize {
909902
self.scaled_size(4)
910903
}
911904

912-
/// Gets the regular byte-wise consensus-serialized size of this transaction.
913-
#[deprecated(since = "0.19.1", note = "Please use `Transaction::size` instead.")]
914-
pub fn get_size(&self) -> usize {
915-
self.size()
916-
}
917-
918905
/// Gets the regular byte-wise consensus-serialized size of this transaction.
919906
pub fn size(&self) -> usize {
920907
self.scaled_size(1)

0 commit comments

Comments
 (0)