core/vm: clear linter warnings (#17057)

* core/vm: clear linter warnings

* core/vm: review input

* core/vm.go: revert lint in noop as per request
This commit is contained in:
Guillaume Ballet
2018-06-26 08:56:25 -04:00
committed by Péter Szilágyi
parent 461291882e
commit 598f786aab
9 changed files with 51 additions and 30 deletions

View File

@ -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 {