Skip to content

Commit

Permalink
Add missing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-iov committed Mar 5, 2024
1 parent 547ddaf commit 00b57ea
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 30 deletions.
3 changes: 1 addition & 2 deletions rskj-core/src/main/java/co/rsk/peg/BridgeSupportFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
import co.rsk.peg.pegininstructions.PeginInstructionsProvider;
import co.rsk.peg.utils.BridgeEventLogger;
import co.rsk.peg.utils.BridgeEventLoggerImpl;
import java.util.List;

import co.rsk.peg.utils.BrigeEventLoggerLegacyImpl;
import java.util.List;
import org.ethereum.config.blockchain.upgrades.ActivationConfig;
import org.ethereum.config.blockchain.upgrades.ConsensusRule;
import org.ethereum.core.Block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
package co.rsk.remasc;

import co.rsk.core.RskAddress;
import co.rsk.peg.FederationMember;
import co.rsk.peg.FederationSupport;
import co.rsk.peg.federation.FederationMember;
import org.ethereum.config.blockchain.upgrades.ActivationConfig;
import org.ethereum.config.blockchain.upgrades.ConsensusRule;
import org.ethereum.crypto.ECKey;
Expand Down
1 change: 1 addition & 0 deletions rskj-core/src/test/java/co/rsk/peg/BridgeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import co.rsk.peg.federation.Federation;
import co.rsk.peg.federation.FederationArgs;
import co.rsk.peg.federation.FederationFactory;
import co.rsk.peg.federation.FederationMember;
import co.rsk.peg.federation.FederationMember.KeyType;
import co.rsk.peg.federation.FederationTestUtils;
import co.rsk.peg.flyover.FlyoverTxResponseCodes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
package co.rsk.peg.federation;

import static co.rsk.bitcoinj.script.Script.MAX_SCRIPT_ELEMENT_SIZE;
import static co.rsk.peg.federation.ErpFederationCreationException.Reason.NULL_OR_EMPTY_EMERGENCY_KEYS;
import static co.rsk.peg.federation.ErpFederationCreationException.Reason.REDEEM_SCRIPT_CREATION_FAILED;
import static co.rsk.peg.bitcoin.RedeemScriptCreationException.Reason.INVALID_CSV_VALUE;
import static co.rsk.peg.bitcoin.ScriptCreationException.Reason.ABOVE_MAX_SCRIPT_ELEMENT_SIZE;
import static co.rsk.peg.federation.ErpFederationCreationException.Reason.NULL_OR_EMPTY_EMERGENCY_KEYS;
import static co.rsk.peg.federation.ErpFederationCreationException.Reason.REDEEM_SCRIPT_CREATION_FAILED;
import static org.junit.jupiter.api.Assertions.*;

import co.rsk.bitcoinj.core.*;
import co.rsk.bitcoinj.script.*;
import co.rsk.config.BridgeConstants;
import co.rsk.config.BridgeMainNetConstants;
import co.rsk.config.BridgeRegTestConstants;
import co.rsk.config.BridgeTestNetConstants;
import co.rsk.bitcoinj.script.Script;
import co.rsk.bitcoinj.script.ScriptOpCodes;
import co.rsk.config.*;
import co.rsk.peg.bitcoin.*;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.bouncycastle.util.encoders.Hex;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -64,9 +56,16 @@ void setup() {
BtcECKey federator8PublicKey = BtcECKey.fromPublicOnly(Hex.decode("031aabbeb9b27258f98c2bf21f36677ae7bae09eb2d8c958ef41a20a6e88626d26"));
BtcECKey federator9PublicKey = BtcECKey.fromPublicOnly(Hex.decode("0245ef34f5ee218005c9c21227133e8568a4f3f11aeab919c66ff7b816ae1ffeea"));
defaultKeys = Arrays.asList(
federator0PublicKey, federator1PublicKey, federator2PublicKey,
federator3PublicKey, federator4PublicKey, federator5PublicKey,
federator6PublicKey, federator7PublicKey, federator8PublicKey, federator9PublicKey
federator0PublicKey,
federator1PublicKey,
federator2PublicKey,
federator3PublicKey,
federator4PublicKey,
federator5PublicKey,
federator6PublicKey,
federator7PublicKey,
federator8PublicKey,
federator9PublicKey
);
defaultThreshold = defaultKeys.size() / 2 + 1;
emergencyKeys = bridgeConstants.getErpFedPubKeysList();
Expand Down Expand Up @@ -529,7 +528,7 @@ void spendFromP2shErpFed(

@Test
void getMemberByBtcPublicKey_passing_existing_btcPublicKey_should_return_found_member(){
BtcECKey existingMemberBtcPublicKey = standardKeys.get(0);
BtcECKey existingMemberBtcPublicKey = defaultKeys.get(0);
Optional<FederationMember> foundMember = federation.getMemberByBtcPublicKey(existingMemberBtcPublicKey);
Assertions.assertTrue(foundMember.isPresent());
Assertions.assertEquals(existingMemberBtcPublicKey, foundMember.get().getBtcPublicKey());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package co.rsk.remasc;

import static org.mockito.Mockito.*;

import co.rsk.blockchain.utils.BlockGenerator;
import co.rsk.config.BridgeMainNetConstants;
import co.rsk.core.RskAddress;
import co.rsk.peg.*;
import co.rsk.peg.BridgeStorageProvider;
import co.rsk.peg.FederationSupport;
import co.rsk.peg.federation.FederationMember;
import co.rsk.test.builders.BlockChainBuilder;
import co.rsk.util.HexUtils;
import org.ethereum.config.blockchain.upgrades.ActivationConfig;
import org.ethereum.config.blockchain.upgrades.ActivationConfigsForTest;
import org.ethereum.config.blockchain.upgrades.ConsensusRule;
import org.ethereum.config.blockchain.upgrades.*;
import org.ethereum.core.Blockchain;
import org.ethereum.core.Genesis;
import org.ethereum.vm.PrecompiledContracts;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import static org.mockito.Mockito.*;

/**
* Created by ajlopez on 14/11/2017.
*/
Expand Down

0 comments on commit 00b57ea

Please sign in to comment.