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

add identify command to wallet #586

Merged
merged 8 commits into from
Oct 1, 2022
Merged

Conversation

raphjaph
Copy link
Collaborator

No description provided.

@raphjaph raphjaph requested a review from casey September 30, 2022 20:04
Copy link
Collaborator

@casey casey left a comment

Choose a reason for hiding this comment

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

Need test coverage for a few cases:

  • identify shows zero ordinals
  • identify shows one ordinal
  • identify shows two ordinal
  • identify shows non-zero ordinal offset (to test offset handling)
  • identify doesn't show anything from output with only common ordinals

One integration tests to test command, the rest unit tests with a wrapper like this:

fn identify(utxo: Vec<Utxo>) -> Vec<(Ordinal, OutPoint, u64, Rarity> {
}
```

src/subcommand/wallet.rs Outdated Show resolved Hide resolved
src/subcommand/wallet.rs Outdated Show resolved Hide resolved
src/subcommand/wallet/identify.rs Outdated Show resolved Hide resolved
src/subcommand/wallet/identify.rs Outdated Show resolved Hide resolved
src/subcommand/wallet/identify.rs Outdated Show resolved Hide resolved
src/subcommand/wallet/identify.rs Outdated Show resolved Hide resolved
src/subcommand/wallet/identify.rs Outdated Show resolved Hide resolved
test-bitcoincore-rpc/src/lib.rs Outdated Show resolved Hide resolved
test-bitcoincore-rpc/src/lib.rs Outdated Show resolved Hide resolved
tests/wallet.rs Outdated Show resolved Hide resolved
@raphjaph raphjaph requested a review from casey October 1, 2022 00:03
Copy link
Collaborator

@casey casey left a comment

Choose a reason for hiding this comment

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

Nice, looks good! Only change would be to add an additional test which passes a two different UTXOs with two different outpoints, each with an uncommon ordinal, and makes sure that the right ordinal is associated with the right outpoint.

test-bitcoincore-rpc/src/lib.rs Outdated Show resolved Hide resolved
@raphjaph raphjaph requested a review from casey October 1, 2022 10:24
Copy link
Collaborator

@casey casey left a comment

Choose a reason for hiding this comment

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

Nice, LGTM!

@casey casey merged commit 5546505 into ordinals:master Oct 1, 2022
@raphjaph raphjaph deleted the add-wallet-identify branch October 7, 2022 19:04
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