-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
|
||
import java.util.List; | ||
|
||
public class FastBridgeParser extends StandardRedeemScriptParser { |
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.
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; |
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.
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
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.
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) { |
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 don't really need this here. The redeem script itself is standard
No description provided.