Skip to content

Implement Anchor for BlockId#1069

Merged
evanlinjin merged 2 commits intobitcoindevkit:masterfrom
vladimirfomene:implement-Anchor-for-BlockId
Aug 28, 2023
Merged

Implement Anchor for BlockId#1069
evanlinjin merged 2 commits intobitcoindevkit:masterfrom
vladimirfomene:implement-Anchor-for-BlockId

Conversation

@vladimirfomene
Copy link
Copy Markdown
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
@vladimirfomene vladimirfomene force-pushed the implement-Anchor-for-BlockId branch from 6328bd1 to 442870f Compare August 9, 2023 10:07
@notmandatory
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@notmandatory let me look into it.

Copy link
Copy Markdown
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.

@vladimirfomene vladimirfomene force-pushed the implement-Anchor-for-BlockId branch from 442870f to 9b5a496 Compare August 11, 2023 02:25
@vladimirfomene
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

And did tokio just break our MSRV?

@vladimirfomene vladimirfomene force-pushed the implement-Anchor-for-BlockId branch from 542e51b to 6f7f3a6 Compare August 16, 2023 09:23
@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
Copy Markdown
Contributor Author

Will rebase once #1077 gets merged

@vladimirfomene vladimirfomene force-pushed the implement-Anchor-for-BlockId branch from b8a5a96 to 691bdf2 Compare August 16, 2023 17:04
Copy link
Copy Markdown
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 :)

@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
Copy Markdown
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.

@vladimirfomene vladimirfomene force-pushed the implement-Anchor-for-BlockId branch from 101e6dd to f39323e Compare August 28, 2023 11:41
@vladimirfomene vladimirfomene force-pushed the implement-Anchor-for-BlockId branch from f39323e to 96d38b9 Compare August 28, 2023 14:07
@vladimirfomene vladimirfomene force-pushed the implement-Anchor-for-BlockId branch from 96d38b9 to 18e8da3 Compare August 28, 2023 14:12
Copy link
Copy Markdown
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
@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