Skip to content
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 flyover parsers #70

Closed
wants to merge 5 commits into from
Closed

Conversation

julia-zack
Copy link

No description provided.


import java.util.List;

public class FastBridgeParser extends StandardRedeemScriptParser {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's call it FlyoverRedeemScriptParser to be consistent with rskj


List<ScriptChunk> subChunks = redeemScriptChunks.subList(2, redeemScriptChunks.size());
if (isFastBridgeMultiSig(redeemScriptChunks)) {
this.multiSigType = MultiSigType.FAST_BRIDGE_MULTISIG;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way I see it we should a single MultiSigType for flyover. Do you think that's feasible? So we avoid adding new types for flyover everytime there is a new script type

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I absolutely agree. Mainly because you can simply remove the flyover values and check for the type as usual.
But should we keep the types for consensus? Are they used besides from testing?

@@ -123,6 +123,10 @@ public Script extractStandardRedeemScript() {
return new Script(redeemScriptChunks);
}

public static Script extractStandardRedeemScript(List<ScriptChunk> redeemScriptChunks) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really need this here. The redeem script itself is standard

@julia-zack julia-zack closed this Nov 22, 2023
@julia-zack julia-zack deleted the refactor-redeem-script-parsers branch November 22, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants