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

btcutils: refactor for vigilante #107

Merged
merged 5 commits into from
Aug 30, 2022
Merged

btcutils: refactor for vigilante #107

merged 5 commits into from
Aug 30, 2022

Conversation

SebastianElvis
Copy link
Member

This PR refactors some BTC utils in order to simplify the development of vigilante reporter.

Specifically, this PR

  • makes fields in BabylonData public
  • makes extractOpReturnData public
  • moves SpvProofFromHeaderAndTransactions from datagen to btccheckpoint/types/

in order to make them reusable for babylonchain/vigilante#8

)

func SpvProofFromHeaderAndTransactions(headerBytes []byte, transactions [][]byte, transactionIdx uint) (*btcctypes.BTCSpvProof, error) {
func SpvProofFromHeaderAndTransactions(headerBytes []byte, transactions [][]byte, transactionIdx uint) (*BTCSpvProof, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe move other spv stuff i.e createBranch and CreateProofForIdx as those things are related to spv ? also maybe leave some TODO here that this implementation will need some tests and maybe benchmarking. (you know it was used only for testing purposes and now will be part of public api so probably more scrunity is needed here)

@SebastianElvis SebastianElvis merged commit 4c963ca into main Aug 30, 2022
@SebastianElvis SebastianElvis deleted the btcutils branch August 30, 2022 22:57
vitsalis added a commit that referenced this pull request Jan 21, 2024
---------

Co-authored-by: Runchao Han <me@runchao.rocks>
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.

2 participants