aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/stack.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-03-24 20:20:34 +0800
committerobscuren <geffobscura@gmail.com>2014-03-24 20:20:34 +0800
commite0b6091d7ef709902f534c1a4b57151f0171e03c (patch)
tree290fa26d9da264a5e365816a80c42f325adb51ef /ethchain/stack.go
parent6a86c517c4f4b372cad0ae1d92e926a482eac5ba (diff)
downloaddexon-e0b6091d7ef709902f534c1a4b57151f0171e03c.tar
dexon-e0b6091d7ef709902f534c1a4b57151f0171e03c.tar.gz
dexon-e0b6091d7ef709902f534c1a4b57151f0171e03c.tar.bz2
dexon-e0b6091d7ef709902f534c1a4b57151f0171e03c.tar.lz
dexon-e0b6091d7ef709902f534c1a4b57151f0171e03c.tar.xz
dexon-e0b6091d7ef709902f534c1a4b57151f0171e03c.tar.zst
dexon-e0b6091d7ef709902f534c1a4b57151f0171e03c.zip
Test fixes and removed old code. Added VM gas fees
Diffstat (limited to 'ethchain/stack.go')
-rw-r--r--ethchain/stack.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/ethchain/stack.go b/ethchain/stack.go
index 3c2899e62..57165c432 100644
--- a/ethchain/stack.go
+++ b/ethchain/stack.go
@@ -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("####################")
}