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

Enhancement: VarInt length #95

Merged
merged 1 commit into from
Dec 14, 2021
Merged

Enhancement: VarInt length #95

merged 1 commit into from
Dec 14, 2021

Conversation

tigh-latte
Copy link
Contributor

Currently the only way to get the lenght of a bt.VarInt is from creating a new one from bytes, or by calling len(v.Bytes()).

I've added a Length() int func which works out and returns this size without having to convert the varint into a byte slice.

@mergify mergify bot added the enhancement New feature or request label Dec 10, 2021
@tigh-latte tigh-latte marked this pull request as draft December 10, 2021 14:02
@tigh-latte tigh-latte marked this pull request as ready for review December 13, 2021 13:28
@mergify mergify bot merged commit 18b76ae into master Dec 14, 2021
@mergify mergify bot deleted the enhancement/varint-length branch December 14, 2021 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants