Test fixes and removed old code. Added VM gas fees

This commit is contained in:
obscuren
2014-03-24 13:20:34 +01:00
parent 6a86c517c4
commit e0b6091d7e
7 changed files with 103 additions and 111 deletions

View File

@ -202,7 +202,7 @@ func (st *Stack) Push(d *big.Int) {
st.data = append(st.data, d)
}
func (st *Stack) Print() {
fmt.Println("### STACK ###")
fmt.Println("### stack ###")
if len(st.data) > 0 {
for i, val := range st.data {
fmt.Printf("%-3d %v\n", i, val)
@ -242,15 +242,15 @@ func (m *Memory) Len() int {
}
func (m *Memory) Print() {
fmt.Println("### MEM ###")
fmt.Printf("### mem %d bytes ###\n", len(m.store))
if len(m.store) > 0 {
addr := 0
for i := 0; i+32 < len(m.store); i += 32 {
for i := 0; i+32 <= len(m.store); i += 32 {
fmt.Printf("%03d %v\n", addr, m.store[i:i+32])
addr++
}
} else {
fmt.Println("-- empty --")
}
fmt.Println("###########")
fmt.Println("####################")
}