Skip to content

Implement getconnectioncount method and test #212

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

Merged
merged 1 commit into from
May 31, 2025

Conversation

GideonBature
Copy link
Contributor

The JSON-RPC method getconnectioncount does return a numeric. We want to test this to catch any changes in behavior in future Core versions.

This PR adds a client function that errors if the return value is anything other than numeric, along with an integration test that calls this function.

Ref: #116

Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

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

ACK 2408e45

@tcharding
Copy link
Member

Hey mate, from now on, to make reviewing the re-export change easier can you just throw the re-export in at the end of the list on its own line. Then in a separate commit run just fmt. That way we can be sure we don't accidentally introduce any mistakes. Holla if you don't understand what I mean.

@tcharding
Copy link
Member

Woops, I rescind my ack. We need to update the tables Returns column s/returns numeric/version/.

@GideonBature
Copy link
Contributor Author

Hey mate, from now on, to make reviewing the re-export change easier can you just throw the re-export in at the end of the list on its own line. Then in a separate commit run just fmt. That way we can be sure we don't accidentally introduce any mistakes. Holla if you don't understand what I mean.

I understand, instead of inserting it manually in the midst of existing re-exports. I will do just that... Thank you.

@GideonBature
Copy link
Contributor Author

Woops, I rescind my ack. We need to update the tables Returns column s/returns numeric/version/.

I thought about this, since those returning the std types now have a type that wraps them, whether to use just version or mixture of version and the std type.

@tcharding
Copy link
Member

version please.

@GideonBature
Copy link
Contributor Author

Alright, noted. Will update all the existing ones.

@tcharding tcharding merged commit aaffcaa into rust-bitcoin:master May 31, 2025
29 checks passed
@GideonBature GideonBature deleted the getconnectioncount branch May 31, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants