diff --git a/rskj-core/src/main/java/co/rsk/rpc/modules/debug/TraceOptions.java b/rskj-core/src/main/java/co/rsk/rpc/modules/debug/TraceOptions.java index 2d69da3e587..b5d3fa3cc40 100644 --- a/rskj-core/src/main/java/co/rsk/rpc/modules/debug/TraceOptions.java +++ b/rskj-core/src/main/java/co/rsk/rpc/modules/debug/TraceOptions.java @@ -28,13 +28,16 @@ public class TraceOptions { private final Set disabledFields; private final Set unsupportedOptions; - public TraceOptions(Map traceOptions) { - supportedOptions = new ArrayList<>(); - supportedOptions.addAll(Arrays.stream(DisableOption.values()) - .map(option -> option.option).collect(Collectors.toList())); + public TraceOptions() { + supportedOptions = Arrays.stream(DisableOption.values()).map(option -> option.option) + .collect(Collectors.toList()); this.disabledFields = new HashSet<>(); this.unsupportedOptions = new HashSet<>(); + } + + public TraceOptions(Map traceOptions) { + this(); if (traceOptions == null || traceOptions.isEmpty()) return; diff --git a/rskj-core/src/main/java/org/ethereum/vm/trace/ProgramTraceProcessor.java b/rskj-core/src/main/java/org/ethereum/vm/trace/ProgramTraceProcessor.java index 016a4ba781b..57a2ae4e97b 100644 --- a/rskj-core/src/main/java/org/ethereum/vm/trace/ProgramTraceProcessor.java +++ b/rskj-core/src/main/java/org/ethereum/vm/trace/ProgramTraceProcessor.java @@ -40,7 +40,7 @@ public class ProgramTraceProcessor { private TraceOptions traceOptions; public ProgramTraceProcessor() { - traceOptions = new TraceOptions(Collections.emptyMap()); + traceOptions = new TraceOptions(); } public ProgramTraceProcessor(TraceOptions options) {