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

Implement Anchor for BlockId #1069

Merged

Conversation

vladimirfomene
Copy link
Contributor

@vladimirfomene vladimirfomene commented Aug 9, 2023

Description

This PR fixes #1062.
It implements the Anchor trait on BlockId.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

@vladimirfomene vladimirfomene self-assigned this Aug 9, 2023
@notmandatory
Copy link
Member

Is it possible to demonstrate using this in a test or example?

@notmandatory notmandatory added this to the 1.0.0-alpha.2 milestone Aug 10, 2023
@vladimirfomene
Copy link
Contributor Author

@notmandatory let me look into it.

Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

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

Thanks for this! Just some thoughts.

crates/chain/src/chain_data.rs Outdated Show resolved Hide resolved
crates/chain/src/chain_data.rs Outdated Show resolved Hide resolved
@vladimirfomene
Copy link
Contributor Author

I think I will be using this for the Nakamoto syncing logic, @evanlinjin do you have an idea on how to write an example or test for this?

@evanlinjin
Copy link
Member

I think I will be using this for the Nakamoto syncing logic, @evanlinjin do you have an idea on how to write an example or test for this?

I think a documentation test for Anchor will be nice.

Like using a LocalChain with a single block, creating multiple TxGraphs with different anchor types and anchoring a single tx into the TxGraphs with the different anchor types.

@evanlinjin
Copy link
Member

And did tokio just break our MSRV?

@vladimirfomene vladimirfomene force-pushed the implement-Anchor-for-BlockId branch 2 times, most recently from a846271 to b8a5a96 Compare August 16, 2023 12:19
@vladimirfomene
Copy link
Contributor Author

Will rebase once #1077 gets merged

Copy link
Member

@danielabrozzoni danielabrozzoni left a comment

Choose a reason for hiding this comment

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

Just a couple of nits :)

crates/chain/src/tx_data_traits.rs Outdated Show resolved Hide resolved
@vladimirfomene vladimirfomene force-pushed the implement-Anchor-for-BlockId branch 4 times, most recently from d81278c to 101e6dd Compare August 27, 2023 08:49
Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

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

Good work, we are nearly there. Documentation can be better.

crates/chain/src/chain_data.rs Outdated Show resolved Hide resolved
crates/chain/src/tx_data_traits.rs Outdated Show resolved Hide resolved
crates/chain/src/tx_data_traits.rs Show resolved Hide resolved
Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

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

ACK 18e8da3

@evanlinjin evanlinjin merged commit e5fb1ec into bitcoindevkit:master Aug 28, 2023
12 checks passed
@notmandatory notmandatory mentioned this pull request Oct 11, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement Anchor for BlockId
4 participants