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

Add conditional break in parsing the script after op return… #170

Merged
merged 3 commits into from
Aug 28, 2023

Conversation

sirdeggen
Copy link
Contributor

…so long as we are not in a conditional block.

This is to get the library in line with v1.0.15.1 of SV node as outlined within this issue: bitcoin-sv/bitcoin-sv#296

Logic should match SV node here: https://github.com/bitcoin-sv/bitcoin-sv/blob/89d55a8ddb0e29f4786e11efad1e92cdefd0b9c5/src/script/script.cpp#L38

… so long as we are not in a conditional block.

This is to get the library in line with v1.0.15.1 of SV node as outlined within this issue: bitcoin-sv/bitcoin-sv#296

Logic should match SV node here: https://github.com/bitcoin-sv/bitcoin-sv/blob/89d55a8ddb0e29f4786e11efad1e92cdefd0b9c5/src/script/script.cpp#L38

Signed-off-by: Darren Kellenschwiler <[email protected]>
Signed-off-by: Darren Kellenschwiler <[email protected]>
@boecklim
Copy link
Collaborator

Hello @sirdeggen
Analogously to this unit test: bscript/interpreter/engine_test.go we should have one for the function Parse() with at least one test case for the issue of the malformed script and ideally with various more test cases

@sirdeggen
Copy link
Contributor Author

sirdeggen commented Aug 26, 2023

@boecklim is Farzan available to get that test written this week? I'm not, but keen to get this in asap.

@mergify mergify bot merged commit ebd4987 into master Aug 28, 2023
14 checks passed
@mergify mergify bot deleted the fix/interpreter-false-if branch August 28, 2023 08:11
ordishs pushed a commit to ordishs/go-bt that referenced this pull request Sep 5, 2023
* Added conditional break in parsing the script after op return…

… so long as we are not in a conditional block.

This is to get the library in line with v1.0.15.1 of SV node as outlined within this issue: bitcoin-sv/bitcoin-sv#296

Logic should match SV node here: https://github.com/bitcoin-sv/bitcoin-sv/blob/89d55a8ddb0e29f4786e11efad1e92cdefd0b9c5/src/script/script.cpp#L38

Signed-off-by: Darren Kellenschwiler <[email protected]>

* typo

Signed-off-by: Darren Kellenschwiler <[email protected]>

* Add unit test for Parse function

---------

Signed-off-by: Darren Kellenschwiler <[email protected]>
Co-authored-by: Michael Boeckli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants