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

feat(BUMP): implementation of NewBUMPFromStream that returns bytes used #84

Merged
merged 3 commits into from
May 24, 2024

Conversation

kuba-4chain
Copy link
Contributor

@kuba-4chain kuba-4chain commented May 22, 2024

What has been done

A new function NewBUMPFromStream was created with the same functionality as NewBUMPFromBytes, except it returns a number of bytes used.

This was modelled on NewTxFromStream from go-bt.

The signature of NewBUMPFromBytes was untouched for backwards compatibility.

Why?

In order to make it easier to parse BUMPs from BEEF and avoid repeating this parsing in SPV, go-bc and Arc :)

@sirdeggen
Copy link
Contributor

All good, thanks. Probably will ask you to refactor with go-sdk one day in future, but I think they will work from this so it'll be the same code.

@boecklim boecklim merged commit f6a717f into libsv:master May 24, 2024
8 checks passed
@kuba-4chain kuba-4chain deleted the feat/new-bump-from-stream branch May 24, 2024 09:19
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.

4 participants