-
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
Refactor federation #2143
Refactor federation #2143
Conversation
…n StandardMultisig and ErpFederation to be consistent with hashCode
rskj-core/src/main/java/co/rsk/peg/StandardMultisigFederation.java
Outdated
Show resolved
Hide resolved
rskj-core/src/test/java/co/rsk/peg/BridgeStorageProviderFederationTests.java
Outdated
Show resolved
Hide resolved
members, | ||
Instant.now(), | ||
123, | ||
bridgeConstants.getBtcParams() | ||
); | ||
byte[] serializedTestFederation = BridgeSerializationUtils.serializeFederation(testFederation); | ||
System.out.println(serializedTestFederation); |
Check notice
Code scanning / CodeQL
Implicit conversion from array to string
@@ -1269,14 +1270,18 @@ | |||
activations | |||
); | |||
byte[] serializedTestErpFederation = BridgeSerializationUtils.serializeFederation(testErpFederation); | |||
System.out.println(serializedTestErpFederation); |
Check notice
Code scanning / CodeQL
Implicit conversion from array to string
ErpFederationRedeemScriptParser.createErpRedeemScriptDeprecated( | ||
ScriptBuilder.createRedeemScript(getNumberOfSignaturesRequired(), getBtcPublicKeys()), | ||
ScriptBuilder.createRedeemScript(erpPubKeys.size() / 2 + 1, erpPubKeys), | ||
activationDelay | ||
); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
Have a look at the code smells, there ara many unused imports and other stuff of simple solution |
…ame variables. Remove logs. Fix some code smells.
rskj-core/src/test/java/co/rsk/peg/StandardMultisigFederationTest.java
Outdated
Show resolved
Hide resolved
rskj-core/src/test/java/co/rsk/peg/StandardMultisigFederationTest.java
Outdated
Show resolved
Hide resolved
rskj-core/src/main/java/co/rsk/peg/BridgeSerializationUtils.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
10e3014
into
federations-refactor-integration
Refactor Federation classes.
Make Federation class abstract.
Create a new class StandardMultisigFederation that inherits from Federation.
Create a new abstract class ErpFederation that inherits from Federation and adds the behavior related to the ERP, rename current ERPFederation class to LegacyErpFederation and tag it as deprecated (this is the class that generates the faulty non standard redeem script).
Make P2SHErpFederation class inherit from ERPFederation.
Eventually, we will add a new class P2shP2wshErpFederation class that also inherits from ERPFederation.