Coverage Summary for Class: VmConfig (co.rsk.config)

Class Class, % Method, % Line, %
VmConfig 100% (1/1) 42.9% (3/7) 71.4% (10/14)


1 /* 2  * This file is part of RskJ 3  * Copyright (C) 2018 RSK Labs Ltd. 4  * 5  * This program is free software: you can redistribute it and/or modify 6  * it under the terms of the GNU Lesser General Public License as published by 7  * the Free Software Foundation, either version 3 of the License, or 8  * (at your option) any later version. 9  * 10  * This program is distributed in the hope that it will be useful, 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13  * GNU Lesser General Public License for more details. 14  * 15  * You should have received a copy of the GNU Lesser General Public License 16  * along with this program. If not, see <http://www.gnu.org/licenses/>. 17  */ 18  19 package co.rsk.config; 20  21 /** 22  * Wraps configuration for the VM, which is usually derived from configuration files. 23  */ 24 public class VmConfig { 25  public static final int LIGHT_TRACE = 1; 26  27  private final boolean vmTrace; 28  private final int vmTraceOptions; 29  private final int vmTraceInitStorageLimit; 30  private final int dumpBlock; 31  private final String dumpStyle; 32  private final byte chainId; 33  34  public VmConfig( 35  boolean vmTrace, 36  int vmTraceOptions, 37  int vmTraceInitStorageLimit, 38  int dumpBlock, 39  String dumpStyle, 40  byte chainId) { 41  this.vmTrace = vmTrace; 42  this.vmTraceOptions = vmTraceOptions; 43  this.vmTraceInitStorageLimit = vmTraceInitStorageLimit; 44  this.dumpBlock = dumpBlock; 45  this.dumpStyle = dumpStyle; 46  this.chainId = chainId; 47  } 48  49  public int dumpBlock() { 50  return dumpBlock; 51  } 52  53  public String dumpStyle() { 54  return dumpStyle; 55  } 56  57  public boolean vmTrace() { 58  return vmTrace; 59  } 60  61  public int vmTraceOptions() { return vmTraceOptions; } 62  63  public int vmTraceInitStorageLimit() { 64  return vmTraceInitStorageLimit; 65  } 66  67  public byte getChainId() { 68  return chainId; 69  } 70 }