Minor cleanup for script analyzer

This commit is contained in:
Andrew Poelstra 2014-08-31 19:20:11 -07:00
parent a8ecf00e35
commit 853d644649
1 changed files with 3 additions and 7 deletions

View File

@ -1061,15 +1061,14 @@ impl AbstractStack {
fn push_initial(&mut self, elem: AbstractStackElem) {
let idx = self.allocate(elem);
self.initial_stack.push(idx);
self.initial_stack.insert(0, idx);
self.stack.insert(0, idx);
}
/// Construct the initial stack in the end
pub fn build_initial_stack(&self) -> Vec<AbstractStackElem> {
let mut res: Vec<AbstractStackElem> =
let res: Vec<AbstractStackElem> =
self.initial_stack.iter().map(|&i| self.alloc[i].clone()).collect();
res.reverse();
res
}
@ -2030,10 +2029,7 @@ impl Script {
match self.satisfy() {
Ok(_) => false,
Err(Unanalyzable) => false,
Err(x) => {
//println!("ispu ret {}", x);
true
}
Err(_) => true
}
}