-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Modify ord list
output to include the end of each range and the off…
#1998
Conversation
…set into the output of the start of each range.
Thanks for the PR! Overall this looks like a useful feature. Here's a few comments:
I'll turn this PR into a draft PR. Please, undraft when you think it's ready for another look. Thanks again for contributing! |
Done.
I can't reproduce that. Everything seems to be passing. Do you have details of what's failing?
I modified the existing test to expect the new output fields.
Ok. |
f07ef7a
to
6f543ac
Compare
@soenkehahn Want to give this another look? |
I'd love to. This feature needs a |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took so long to review!
Here's the failing log: https://github.com/casey/ord/actions/runs/4591718231/jobs/8108123525. But you fixed it in later commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to follow up on Sönke's review with my own! Sorry for letting this and other PRs of yours languish.
This looks good, and I think it's close to being mergeable. The only issue that needs to be addressed before merging is that the tuple is getting out of hand. Now that there are two new fields in this tuple, the list
function should definitely return Vec<Output>
for clarity.
So the new list function signature would be:
fn list(
outpoint: OutPoint,
ranges: Vec<(u64, u64)>,
) -> Vec<Output> {
…
}
@soenkehahn started helping with project maintenance recently, so we're still syncing up on the coding and testing style. For this PR, the current tests are good enough, so you can ignore the other comments for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the changes Casey requested.
dcc6a6a
to
6f543ac
Compare
* Add contributing section (ordinals#2261) * Implement clean index shutdown to prevent index corruption (with clippy updates for Rust 1.71) (ordinals#2275) * gracefully shutdown index update thread to prevent index corruption * Use `next_back()` instead of `rev().next()` for rust 1.71 --------- Co-authored-by: victorkirov <victor.kirov@gmail.com> * Modify `ord list` output to include the end of each range (ordinals#1998) * Don't create default data directory if --index overrides it (ordinals#1991) * Fix docs inconsistency (ordinals#2276) * Fix ordering for reinscriptions and show all reinscriptions for sat (ordinals#2279) * Add satpoint and address to index export (ordinals#2284) * Update bitcoin dependencies (ordinals#2281) * Update redb (ordinals#2294) * Add retry to fetcher (ordinals#2297) * Clean up deploy scripts (ordinals#2298) * Fix justfile recipe (ordinals#2299) * Release 0.8.1 (ordinals#2300) * Add `amount` field to `wallet inscriptions` output. (ordinals#1928) * Fix dust limit for padding in `TransactionBuilder` (ordinals#1929) * Inform user when redb starts in recovery mode (ordinals#2304) * Fix remote RPC wallet commands (ordinals#1766) * Select multiple utxos (ordinals#2303) Co-authored-by: Greg Martin <gm7t2@gmail.com> * feat: add outputs api --------- Co-authored-by: raph <raphjaph@protonmail.com> Co-authored-by: victorkirov <victor.kirov@gmail.com> Co-authored-by: gmart7t2 <49558347+gmart7t2@users.noreply.github.com> Co-authored-by: ordinally <11798624+veryordinally@users.noreply.github.com> Co-authored-by: Carlos Alaniz <carlosglvn93@gmail.com> Co-authored-by: Greg Martin <gm7t2@gmail.com>
Modify
ord list
output to include the end of each range and the offset into the output of the start of each range.Sometimes when sat hunting I will find a sat that I want to isolate and it will be in the 1000th range in its output. I want to use
ord wallet send
to send the sat to a new address but to do that i need to know its satpoint, which means itstxid
,vout
, andoffset
.The
txid
andvout
are obvious. They define the output I am looking at. But to know the offset I have to sum the sizes of the 999 ranges before the sat I am interested in.I figure it is better to have
ord
do that summing than to expect the user to do it for themselves., so that's what this change does.