Skip to content

Commit

Permalink
- Removed unused constant
Browse files Browse the repository at this point in the history
- Updated BridgeEventLoggerImpl constructor call
- Fix failing tests
  • Loading branch information
nathanieliov committed Jan 13, 2025
1 parent 1c65082 commit 3d07157
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/test/java/co/rsk/federate/BtcToRskClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import co.rsk.federate.signing.utils.TestUtils;
import co.rsk.net.NodeBlockProcessor;
import co.rsk.peg.PegUtilsLegacy;
import co.rsk.peg.bitcoin.BitcoinUtils;
import co.rsk.peg.btcLockSender.*;
import co.rsk.peg.btcLockSender.BtcLockSender.TxSenderAddressType;
import co.rsk.peg.constants.BridgeConstants;
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/co/rsk/federate/bitcoin/BitcoinTestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.bouncycastle.util.encoders.Hex;
import org.ethereum.crypto.HashUtil;

public final class BitcoinTestUtils {

public static final byte[] WITNESS_COMMITMENT_HEADER = Hex.decode("aa21a9ed");
public static final Sha256Hash WITNESS_RESERVED_VALUE = Sha256Hash.ZERO_HASH;
public static final int WITNESS_COMMITMENT_LENGTH = WITNESS_COMMITMENT_HEADER.length + Sha256Hash.LENGTH;

private BitcoinTestUtils() { }

public static List<Coin> coinListOf(long... values) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,10 @@ void processBlock_ok() {
TransactionReceipt receipt = mock(TransactionReceipt.class);
List<LogInfo> logs = new ArrayList<>();

SignatureCache signatureCache = new BlockTxSignatureCache(new ReceivedTxSignatureCache());

BridgeEventLoggerImpl bridgeEventLogger = new BridgeEventLoggerImpl(
new BridgeRegTestConstants(),
activations,
logs,
signatureCache
logs
);

Keccak256 value = createHash(3);
Expand Down Expand Up @@ -282,13 +279,10 @@ void accepts_transaction_with_two_release_requested() {
TransactionReceipt receipt = mock(TransactionReceipt.class);
List<LogInfo> logs = new ArrayList<>();

SignatureCache signatureCache = new BlockTxSignatureCache(new ReceivedTxSignatureCache());

BridgeEventLoggerImpl bridgeEventLogger = new BridgeEventLoggerImpl(
new BridgeRegTestConstants(),
activations,
logs,
signatureCache
logs
);

Keccak256 releaseRequestTxHash = createHash(3);
Expand Down

0 comments on commit 3d07157

Please sign in to comment.