diff --git a/rskj-core/src/main/java/org/ethereum/facade/EthereumImpl.java b/rskj-core/src/main/java/org/ethereum/facade/EthereumImpl.java index 247602f1fa8..8b3cec0a317 100644 --- a/rskj-core/src/main/java/org/ethereum/facade/EthereumImpl.java +++ b/rskj-core/src/main/java/org/ethereum/facade/EthereumImpl.java @@ -37,7 +37,7 @@ public class EthereumImpl implements Ethereum { private final CompositeEthereumListener compositeEthereumListener; private final Blockchain blockchain; private final GasPriceTracker gasPriceTracker; - private final Double minGasPriceMultiplier; + private final double minGasPriceMultiplier; public EthereumImpl( ChannelManager channelManager, @@ -45,7 +45,7 @@ public EthereumImpl( CompositeEthereumListener compositeEthereumListener, Blockchain blockchain, GasPriceTracker gasPriceTracker, - Double minGasPriceMultiplier) { + double minGasPriceMultiplier) { this.channelManager = channelManager; this.transactionGateway = transactionGateway; diff --git a/rskj-core/src/test/java/org/ethereum/facade/EthereumImplTest.java b/rskj-core/src/test/java/org/ethereum/facade/EthereumImplTest.java index 6e9ee25bc19..1502e7069cc 100644 --- a/rskj-core/src/test/java/org/ethereum/facade/EthereumImplTest.java +++ b/rskj-core/src/test/java/org/ethereum/facade/EthereumImplTest.java @@ -1,3 +1,20 @@ +/* + * This file is part of RskJ + * Copyright (C) 2023 RSK Labs Ltd. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ package org.ethereum.facade; import co.rsk.core.Coin; @@ -21,17 +38,17 @@ void getGasPrice_returns_GasPriceTrackerValue_when_feeMarketWorking_is_true() { when(gasPriceTracker.isFeeMarketWorking()).thenReturn(true); when(gasPriceTracker.getGasPrice()).thenReturn(Coin.valueOf(10)); - Ethereum ethereum = new EthereumImpl(null, null, new CompositeEthereumListener(), null, gasPriceTracker, null); + Ethereum ethereum = new EthereumImpl(null, null, new CompositeEthereumListener(), null, gasPriceTracker, 1); Coin price = ethereum.getGasPrice(); assertEquals(10, price.asBigInteger().intValue()); } @Test - void getGasPrice_returns_correctedBestBlockValue_when_feeMarketWorking_is_false(){ + void getGasPrice_returns_correctedBestBlockValue_when_feeMarketWorking_is_false() { GasPriceTracker gasPriceTracker = mock(GasPriceTracker.class); Blockchain blockchain = mock(Blockchain.class); - Double minGasPriceMultiplier = 1.2; + double minGasPriceMultiplier = 1.2; Block bestBlock = mock(Block.class); when(gasPriceTracker.isFeeMarketWorking()).thenReturn(false);