aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/stack.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/stack.go')
-rw-r--r--core/vm/stack.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/vm/stack.go b/core/vm/stack.go
index 9c10d50ad..4c1b9e803 100644
--- a/core/vm/stack.go
+++ b/core/vm/stack.go
@@ -21,7 +21,7 @@ import (
"math/big"
)
-// stack is an object for basic stack operations. Items popped to the stack are
+// Stack is an object for basic stack operations. Items popped to the stack are
// expected to be changed and modified. stack does not take care of adding newly
// initialised objects.
type Stack struct {
@@ -32,6 +32,7 @@ func newstack() *Stack {
return &Stack{data: make([]*big.Int, 0, 1024)}
}
+// Data returns the underlying big.Int array.
func (st *Stack) Data() []*big.Int {
return st.data
}
@@ -80,6 +81,7 @@ func (st *Stack) require(n int) error {
return nil
}
+// Print dumps the content of the stack
func (st *Stack) Print() {
fmt.Println("### stack ###")
if len(st.data) > 0 {