summaryrefslogtreecommitdiff
path: root/vm/stack.go
diff options
context:
space:
mode:
authorstefan <stefan@s00.xyz>2023-05-24 22:29:46 -0400
committerstefan <stefan@s00.xyz>2023-05-24 22:29:46 -0400
commit20621e073562ee5d423b636fae8b6aa8e38275fa (patch)
tree4a81bde039e58602e44a213cfb8d91a65f1dadd9 /vm/stack.go
parentba2b9c8a1bb1876b6eb4c9783fde798b19de4418 (diff)
downloadevm-20621e073562ee5d423b636fae8b6aa8e38275fa.tar.gz
readme and cleanup
Diffstat (limited to 'vm/stack.go')
-rw-r--r--vm/stack.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vm/stack.go b/vm/stack.go
index fc1cbd4..ec2a738 100644
--- a/vm/stack.go
+++ b/vm/stack.go
@@ -2,8 +2,8 @@ package main
import (
"log"
-
- "github.com/holiman/uint256"
+ "fmt"
+ "github.com/holiman/uint256"
)
const STACK_CAP = (1 << 10)
@@ -11,6 +11,7 @@ const STACK_CAP = (1 << 10)
type Stack []uint256.Int
func (s *Stack) Push(x *uint256.Int) {
+ fmt.Printf("pushing %s to stack\n", x.String())
*s = append(*s, *x)
if len(*s) + 1 > STACK_CAP {
log.Fatal("stack overflow")