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

Add a 'b' key to record which blocks have been indexed #271

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

marcopeereboom
Copy link
Contributor

Summary

Changes

@marcopeereboom marcopeereboom requested a review from a team as a code owner October 1, 2024 17:22
@github-actions github-actions bot added the area: tbc This is a change to TBC (Tiny Bitcoin) label Oct 1, 2024
@marcopeereboom marcopeereboom changed the title Add a 'b' key to record whoch blocks have been indexed Add a 'b' key to record which blocks have been indexed Oct 1, 2024
Comment on lines +999 to +1000
if _, ok := bm[string(k[33:65])]; !ok {
copy(block[1:], k[33:65])
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could avoid reslicing key twice by adding a variable:

Suggested change
if _, ok := bm[string(k[33:65])]; !ok {
copy(block[1:], k[33:65])
hash := k[33:65]
if _, ok := bm[string(hash)]; !ok {
copy(block[1:], hash)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tbc This is a change to TBC (Tiny Bitcoin)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants