Skip to content

Conversation

@rustaceanrob
Copy link
Collaborator

To help with type safety a bit, I have public callsites use an impl Borrow<[u8; 4]>, which the p2p::Magic type implements. This way one can pass magic variables directly. In the handshake this just gets dereferenced anyway, but it still feels more ergonomic than forcing a to_bytes on the caller IMO.

I keep the secp256k1 the same, but maybe it can be bumped. I forget if there are problems when attempting to build conflicting versions or not.

To help with type safety a bit, I have public callsites use an `impl
Borrow<[u8; 4]>`, which the `p2p::Magic` type implements. This way one
can pass magic variables directly. In the handshake this just gets
dereferenced anyway, but it still feels more ergonomic than forcing a
`to_bytes` on the caller IMO.

I keep the `secp256k1` the same, but maybe it can be bumped. I forget if
there are problems when attempting to build conflicting versions or not.
@nyonson
Copy link
Collaborator

nyonson commented Sep 5, 2025

Dope, looks clean to me. I think the failures are legit, as far as we might just have to tweak the docs if its too annoying to get bitcoin in the namespace for them.

@rustaceanrob
Copy link
Collaborator Author

Going to clean it up next week, but in the meantime, any idea of what the no_std error is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants