-
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
Include SVP transactions as possible transaction types to be used by the Bridge #2857
base: feature/powpeg_validation_protocol-phase4
Are you sure you want to change the base?
Include SVP transactions as possible transaction types to be used by the Bridge #2857
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
3a01401
to
c00a63f
Compare
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.
Looking good to me
Fix broken tests in BridgeSupportFlyoverTest class
assertTrue(federationContext.getRetiringFederation().isPresent()); | ||
assertEquals(retiringFederation, federationContext.getRetiringFederation().get()); |
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.
nit:
Federation retiringFederation = federationContext.getRetiringFederation();
assertTrue(retiringFederation.isPresent());
assertEquals(retiringFederation, retiringFederation.get());
assertTrue(federationContext.getLastRetiredFederationP2SHScript().isPresent()); | ||
assertEquals(lastRetiredFederationP2SHScript, federationContext.getLastRetiredFederationP2SHScript().get()); |
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.
same here:
Script lastRetiredFederationP2SHScript = federationContext.getLastRetiredFederationP2SHScript();
assertTrue(lastRetiredFederationP2SHScript.isPresent());
assertEquals(lastRetiredFederationP2SHScript, lastRetiredFederationP2SHScript.get());
public FederationContext(Federation activeFederation) { | ||
this.activeFederation = activeFederation; | ||
} |
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 FederationContext(Federation activeFederation) { | |
this.activeFederation = activeFederation; | |
} | |
private FederationContext(Federation activeFederation) { | |
this.activeFederation = activeFederation; | |
} | |
public static FederationContext of(Federation activeFederation) { | |
return new FederationContext(activeFederation); | |
} |
@@ -16,34 +16,154 @@ | |||
public interface FederationSupport { | |||
|
|||
Federation getActiveFederation(); |
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.
Federation getActiveFederation(); | |
/** | |
* Returns the currently active federation. | |
* See getActiveFederationReference() for details. | |
* @return the active federation. | |
*/ | |
Federation getActiveFederation(); | |
Federation getActiveFederation(); |
default -> { | ||
String message = String.format("This is not a peg-in, a peg-out nor a migration tx %s", btcTx.getHash()); |
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.
We need to update this message. Maybe make sense to just say "This is not a bridge transaction".
retiringFederation.ifPresent( | ||
federation -> standardP2shScripts.add(getFederationStandardP2SHScript(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.
retiringFederation.ifPresent( | |
federation -> standardP2shScripts.add(getFederationStandardP2SHScript(federation)) | |
); | |
retiringFederation.map(PegUtilsLegacy::getFederationStandardP2SHScript).ifPresent(standardP2shScripts::add); |
Description
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: