Minor improvements
* Moved gas and mem size to its own function
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user