Merge rust-bitcoin/rust-bitcoin#771: Add Witness::new()
5d27c15717
Add Witness::new() (sanket1729) Pull request description: Rebasing rust-miniscript on rust-bitcoin master. Expect more trivial PRs :) ACKs for top commit: dr-orlovsky: ACK5d27c15717
apoelstra: ACK5d27c15717
Tree-SHA512: f1b6b1bba1ba6f153416be514b53d64bb6ba0c1cc1f182857f5010a048004f884d5c36ef96f6e27837bf682d781e3a4375bf2303e1f53685019406e88e192a03
This commit is contained in:
commit
d9bc48f12f
|
@ -120,6 +120,12 @@ impl Encodable for Witness {
|
|||
}
|
||||
|
||||
impl Witness {
|
||||
|
||||
/// Create a new empty [`Witness`]
|
||||
pub fn new() -> Self {
|
||||
Witness::default()
|
||||
}
|
||||
|
||||
/// Creates [`Witness`] object from an array of byte-arrays
|
||||
pub fn from_vec(vec: Vec<Vec<u8>>) -> Self {
|
||||
let witness_elements = vec.len();
|
||||
|
|
Loading…
Reference in New Issue