Add `into_vec` method to Script

This commit is contained in:
Andrew Poelstra 2016-06-02 23:47:29 +00:00
parent 35832e3da0
commit 6ccd157775
2 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,7 @@
[package] [package]
name = "bitcoin" name = "bitcoin"
version = "0.5.9" version = "0.5.10"
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"] authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
license = "CC0-1.0" license = "CC0-1.0"
homepage = "https://github.com/apoelstra/rust-bitcoin/" homepage = "https://github.com/apoelstra/rust-bitcoin/"

View File

@ -1874,6 +1874,9 @@ impl Script {
/// Whether the script is the empty script /// Whether the script is the empty script
pub fn is_empty(&self) -> bool { self.0.is_empty() } pub fn is_empty(&self) -> bool { self.0.is_empty() }
/// Convert the script into a byte vector
pub fn into_vec(self) -> Vec<u8> { self.0.into_vec() }
/// Trace a script /// Trace a script
pub fn trace<'a>(&'a self, secp: &Secp256k1, stack: &mut Vec<MaybeOwned<'a>>, pub fn trace<'a>(&'a self, secp: &Secp256k1, stack: &mut Vec<MaybeOwned<'a>>,
input_context: Option<(&Transaction, usize)>) input_context: Option<(&Transaction, usize)>)