diff --git a/CHANGELOG.md b/CHANGELOG.md index 815dd78..87d754d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Replace `usize` with `bitcoin::Amount` in the primed transaction interfaces. +### Fixed +- Use the transaction size instead of weight for `sign_with_rate`. +Also explicitly state the expected rate unit: sat/vByte. + ## [0.4.0] - 2020-09-15 ### Changed diff --git a/lib/src/bitcoin/witness/primed_transaction.rs b/lib/src/bitcoin/witness/primed_transaction.rs index f2e9355..693305d 100644 --- a/lib/src/bitcoin/witness/primed_transaction.rs +++ b/lib/src/bitcoin/witness/primed_transaction.rs @@ -183,6 +183,15 @@ impl PrimedTransaction { } } + #[deprecated( + since = "0.4.1", + note = "`estimate_size` should be used instead for fee purposes." + )] + pub fn estimate_weight(&self) -> usize { + self._transaction_without_signatures_or_output_values() + .get_weight() + } + pub fn estimate_size(&self) -> usize { self._transaction_without_signatures_or_output_values() .get_size()