-
Notifications
You must be signed in to change notification settings - Fork 219
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
feat: add unique id index to lmdb #3407
feat: add unique id index to lmdb #3407
Conversation
cargo fmt Rebase fixes
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.
utAck - so the idea is that the hash preimage is asset namespace/class || the token
?
@@ -445,6 +449,16 @@ impl LMDBDatabase { | |||
"utxo_commitment_index", | |||
)?; | |||
|
|||
if let Some(unique_id) = &output.features.unique_id.clone() { |
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.
if let Some(unique_id) = &output.features.unique_id.clone() { | |
if let Some(unique_id) = output.features.unique_id.as_ref() { |
@@ -567,6 +581,10 @@ impl LMDBDatabase { | |||
"utxo_commitment_index", | |||
)?; | |||
|
|||
if let Some(unique_id) = input.features.unique_id.clone() { |
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.
if let Some(unique_id) = input.features.unique_id.clone() { | |
if let Some(unique_id) = input.features.unique_id.as_ref() { |
@@ -841,6 +859,9 @@ impl LMDBDatabase { | |||
output.commitment.as_bytes(), | |||
"utxo_commitment_index", | |||
)?; | |||
if let Some(unique_id) = output.features.unique_id.clone() { |
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.
if let Some(unique_id) = output.features.unique_id.clone() { | |
if let Some(unique_id) = output.features.unique_id.as_ref() { |
Sounds right, I think according to proposed RFC |
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.
as per the proposed RFC the key for the index should be parent_public_key || unique_id
I'm happy to pick this up as part of the validations I'm doing @StriderDM 👍 |
Included in #3416 thanks @StriderDM ! |
Description
Adds unique_id index to lmdb