github.com/datachainlab/burrow@v0.25.0/execution/evm/options.go (about)

     1  package evm
     2  
     3  import "github.com/hyperledger/burrow/execution/errors"
     4  
     5  func MemoryProvider(memoryProvider func(errors.Sink) Memory) func(*VM) {
     6  	return func(vm *VM) {
     7  		vm.memoryProvider = memoryProvider
     8  	}
     9  }
    10  
    11  func DebugOpcodes(vm *VM) {
    12  	vm.debugOpcodes = true
    13  }
    14  
    15  func DumpTokens(vm *VM) {
    16  	vm.dumpTokens = true
    17  }
    18  
    19  func StackOptions(callStackMaxDepth uint64, dataStackInitialCapacity uint64, dataStackMaxDepth uint64) func(*VM) {
    20  	return func(vm *VM) {
    21  		vm.params.CallStackMaxDepth = callStackMaxDepth
    22  		vm.params.DataStackInitialCapacity = dataStackInitialCapacity
    23  		vm.params.DataStackMaxDepth = dataStackMaxDepth
    24  	}
    25  }