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

tbc: add block-by-hash command to RPC, use chainhash #224

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

joshuasing
Copy link
Contributor

@joshuasing joshuasing commented Aug 22, 2024

Summary
Add tbcapi-block-by-hash and tbcapi-block-by-hash-raw commands to TBC RPC.
Additionally, use chainhash.Hash for all hashes in RPC.

Closes #219

Changes

  • Add tbcapi-block-by-hash and tbcapi-block-by-hash-raw commands to TBC RPC, these commands can be used to retrieve blocks by their hash.
  • Use chainhash.Hash instead of api.ByteSlice for hashes in RPC. This is a breaking change. Raw RPC calls must now provide hashes in display-order as well.
  • Capitalise Utxo as UTXO consistently in the tbcapi package. Initialisms should be all uppercase, per https://go.dev/wiki/CodeReviewComments#initialisms

@joshuasing joshuasing added type: enhancement This improves existing functionality type: feature This adds new functionality status: breaking This is a breaking and non-backwards compatible change size: M This change is medium (+/- <200) area: tbc This is a change to TBC (Tiny Bitcoin) labels Aug 22, 2024
@joshuasing joshuasing requested review from marcopeereboom and a team as code owners August 22, 2024 17:09
@github-actions github-actions bot added the area: make This changes a Makefile label Aug 22, 2024
@joshuasing joshuasing added this to the v0.4.0 milestone Aug 26, 2024
@joshuasing joshuasing force-pushed the joshua/tbc-block-by-hash branch from dc346fe to 9ee0f38 Compare August 30, 2024 15:20
@joshuasing joshuasing merged commit 64efe3f into main Sep 3, 2024
6 checks passed
@joshuasing joshuasing deleted the joshua/tbc-block-by-hash branch September 3, 2024 14:40
web3cryptoguy pushed a commit to web3cryptoguy/heminetwork that referenced this pull request Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: make This changes a Makefile area: tbc This is a change to TBC (Tiny Bitcoin) size: M This change is medium (+/- <200) status: breaking This is a breaking and non-backwards compatible change type: enhancement This improves existing functionality type: feature This adds new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tbc: add block-by-hash command to RPC
3 participants