-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erase the constant REGTEST_FEDERATION_PRIVATE_KEYS from the tests #2930
base: bridge-refactors-integration
Are you sure you want to change the base?
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
Address federationAddress = genesisFederation.getAddress(); | ||
wallet.addWatchedAddress(federationAddress, genesisFederation.getCreationTime().toEpochMilli()); | ||
Federation federation = getErpFederationWithPrivKeys(networkParameters, fedKeys); | ||
Wallet wallet = new BridgeBtcWallet(btcContext, Collections.singletonList(federation)); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
Wallet federationWallet = new BridgeBtcWallet(btcContext, Collections.singletonList(genesisFederation)); | ||
assertTrue(isValidPegInTx(tx, genesisFederation, federationWallet, bridgeConstantsMainnet, activations)); | ||
Wallet federationWallet = new BridgeBtcWallet(btcContext, Collections.singletonList(federation)); | ||
assertTrue(isValidPegInTx(tx, federation, federationWallet, bridgeConstantsMainnet, activations)); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
Wallet federationWallet = new BridgeBtcWallet(btcContext, Collections.singletonList(genesisFederation)); | ||
assertFalse(isValidPegInTx(tx, genesisFederation, federationWallet, bridgeConstantsMainnet, activations)); | ||
Wallet federationWallet = new BridgeBtcWallet(btcContext, Collections.singletonList(federation)); | ||
assertFalse(isValidPegInTx(tx, federation, federationWallet, bridgeConstantsMainnet, activations)); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
Wallet federationWallet = new BridgeBtcWallet(btcContext, Collections.singletonList(genesisFederation)); | ||
assertTrue(isValidPegInTx(tx, genesisFederation, federationWallet, bridgeConstantsMainnet, activations)); | ||
Wallet federationWallet = new BridgeBtcWallet(btcContext, Collections.singletonList(federation)); | ||
assertTrue(isValidPegInTx(tx, federation, federationWallet, bridgeConstantsMainnet, activations)); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
|
||
assertTrue(scriptCorrectlySpendsTx(tx, 0, genesisFederation.getP2SHScript())); | ||
assertTrue(scriptCorrectlySpendsTx(tx, 0, federation.getP2SHScript())); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
@@ -2289,7 +2285,7 @@ | |||
.build(); | |||
tx.getInput(0).setScriptSig(invalidScript); | |||
|
|||
assertFalse(scriptCorrectlySpendsTx(tx, 0, genesisFederation.getP2SHScript())); | |||
assertFalse(scriptCorrectlySpendsTx(tx, 0, federation.getP2SHScript())); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
The tests in https://github.com/rsksmart/rskj/blob/398faa59ef120c989d61cacbd4492969bbe5bf59/rskj-core/src/test/java/co/rsk/peg/RskForksBridgeTest.java use |
343f19d
to
aa90966
Compare
…idatorIntrinsicGasLimitValidatorTest
…eIT (ex BridgeTestIntegration.java)
…eSupportAddSignatureTest
8ba7ec8
to
7c135be
Compare
@@ -304,7 +304,7 @@ public static Constants regtest() { | |||
); | |||
} | |||
|
|||
public static Constants regtestWithFederation(List<BtcECKey> genesisFederationPublicKeys) { | |||
public static Constants regtestWithFederation(List<BtcECKey> federation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static Constants regtestWithFederation(List<BtcECKey> federation) { | |
public static Constants regtestWithFederation(List<BtcECKey> federationPublicKeys) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
BtcECKey.fromPrivate(Hex.decode("45c5b07fc1a6f58892615b7c31dca6c96db58c4bbc538a6b8a22999aaa860c32")), | ||
BtcECKey.fromPrivate(Hex.decode("505334c7745df2fc61486dffb900784505776a898377172ffa77384892749179")), | ||
BtcECKey.fromPrivate(Hex.decode("bed0af2ce8aa8cb2bc3f9416c9d518fdee15d1ff15b8ded28376fcb23db6db69")) | ||
private static final List<BtcECKey> retiringFedKeys = BitcoinTestUtils.getBtcEcKeysFromSeeds( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why retiring fed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a copy paste, my bad! Fixed!
BtcECKey.fromPrivate(Hex.decode("45c5b07fc1a6f58892615b7c31dca6c96db58c4bbc538a6b8a22999aaa860c32")), | ||
BtcECKey.fromPrivate(Hex.decode("505334c7745df2fc61486dffb900784505776a898377172ffa77384892749179")), | ||
BtcECKey.fromPrivate(Hex.decode("bed0af2ce8aa8cb2bc3f9416c9d518fdee15d1ff15b8ded28376fcb23db6db69")) | ||
private static final List<BtcECKey> fedECKeys = BitcoinTestUtils.getBtcEcKeysFromSeeds( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static final List<BtcECKey> fedECKeys = BitcoinTestUtils.getBtcEcKeysFromSeeds( | |
private static final List<BtcECKey> fedBtcECKeys = BitcoinTestUtils.getBtcEcKeysFromSeeds( |
careful, ECKeys is for rsk and mst keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how's that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case, it is fixed already!
…regtestWithFederation method
Quality Gate passedIssues Measures |
Description
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: