libsv / go-bt

The go-to Bitcoin Transaction (BT) Go library.
https://pkg.go.dev/mod/github.com/libsv/go-bt
ISC License
66 stars 26 forks source link

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

Closed sirdeggen closed 1 year ago

sirdeggen commented 1 year ago

…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: https://github.com/bitcoin-sv/bitcoin-sv/issues/296

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

boecklim commented 1 year ago

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 commented 1 year ago

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