Running contracts fixed

This commit is contained in:
obscuren
2014-02-19 11:35:17 +01:00
parent c866fcc5b3
commit 24f2b2afc3
10 changed files with 120 additions and 98 deletions

View File

@ -163,5 +163,12 @@ func (st *Stack) Push(d *big.Int) {
st.data = append(st.data, d)
}
func (st *Stack) Print() {
fmt.Println(st.data)
fmt.Println("# val (STACK)")
if len(st.data) > 0 {
for i, val := range st.data {
fmt.Printf("%-3d %v\n", i, val)
}
} else {
fmt.Println("-- empty --")
}
}