Commit 4547a05a authored by obscuren's avatar obscuren

Minor improvements

* Moved gas and mem size to its own function
parent 4b4e0821
......@@ -91,6 +91,12 @@ func (st *Stack) Get(amount *big.Int) []*big.Int {
return nil
}
func (st *Stack) require(n int) {
if st.Len() < n {
panic(fmt.Sprintf("stack underflow (%d <=> %d)", st.Len(), n))
}
}
func (st *Stack) Print() {
fmt.Println("### stack ###")
if len(st.data) > 0 {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment