-
Notifications
You must be signed in to change notification settings - Fork 626
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
Re-factor/re-name blockdata #1296
Conversation
Woops fuzzing, will re-spin tomorrow if I get a concept ACK. |
Why renaming? I think |
I was not participating in any discussions about it, but to me it always seemed superfluous, and block data seems and its decoding and encoding seems like a centerpiece of the whole crate. And generally there module namespace seems to have more depth then necessary. |
The goal here is to move this stuff into its own crate, which would contain this data as well as compact blocks (bip 158), maybe addresses and hashes, etc., which is not all "block data". |
In my experience |
@Kixunil right, so it would be nice if |
d5e69d8
to
d06d7cc
Compare
Fixed paths in fuzz code. |
If |
IMHO, if But if the dependency would exist anyway, which I suspect would be the case, then caveat: I am just spitballing here and will probably forget I said this the next time we have a problem that suggests the opposite thing would be wise :) |
Is
Indeed, methods like |
All the bitcoin primitives go into I think conceptually |
d06d7cc
to
6cd2798
Compare
Defining things by in which file Core has them doesn't sound great. |
Re-name the `blockdata` module to `primitives`. Refactor only, no logic changes.
Move the `script` module out of `primitives` and into the crate root. Move `opcodes` to the newly created `script` module. Refactor only, no logic changes.
Inline the code out of `primitives/constants.rs` into `primitives/mod.rs`. Refactor only, no logic changes.
6cd2798
to
302f386
Compare
I've rebased but I don't know whats the decision on this one, perhaps we should leave this until we discussed our next moves. Converting to draft. |
Sweet, I've had a couple of goes and keep getting tied in knots. |
Oh, hell, this is much worse than I thought... |
Consumed by #2756 |
This is a re-do of the first three patches in #525. The git log for each commit is a bit light on why we should be doing this (because I'm more or less blindly following #525 after about 30 seconds of "hmm seems reasonable").