Skip to content

Commit

Permalink
perf: fix sonar complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
Vovchyk committed Aug 5, 2024
1 parent e6bdfac commit d3d49aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
10 changes: 4 additions & 6 deletions rskj-core/src/main/java/org/ethereum/vm/CallCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


package org.ethereum.vm;

import co.rsk.core.types.bytes.BytesSlice;
Expand All @@ -28,11 +27,10 @@
*/
public class CallCreate {

final BytesSlice data;
final byte[] destination;
final long gasLimit;
final byte[] value;

private final BytesSlice data;
private final byte[] destination;
private final long gasLimit;
private final byte[] value;

public CallCreate(BytesSlice data, byte[] destination, long gasLimit, byte[] value) {
this.data = data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Memory implements ProgramListenerAware {
private static final int CHUNK_SIZE = 1024;
private static final int WORD_SIZE = 32;

private List<byte[]> chunks = new LinkedList<>();
private final List<byte[]> chunks = new LinkedList<>();
private int softSize;
private ProgramListener traceListener;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
public class ProgramInvokeImpl implements ProgramInvoke {

private BlockStore blockStore;
private final BlockStore blockStore;
/**
* TRANSACTION env **
*/
Expand All @@ -47,9 +47,8 @@ public class ProgramInvokeImpl implements ProgramInvoke {
private final DataWord balance;
private final DataWord txGasPrice;
private final DataWord callValue;
private long gas;

BytesSlice msgData;
private final long gas;
private final BytesSlice msgData;

/**
* BLOCK env **
Expand Down

0 comments on commit d3d49aa

Please sign in to comment.