Try to only keep one copy of each claim in the store #149

Merged
6ea86b96 merged 1 commit from fetch-claim-list-mine into master 2017-05-29 22:17:39 +02:00
6ea86b96 commented 2017-05-28 15:03:11 +02:00 (Migrated from github.com)

I think it would be cool to try to only keep one copy of any object in the store, to avoid weird problems later on with the same thing having different properties.

I think it would be cool to try to only keep one copy of any object in the store, to avoid weird problems later on with the same thing having different properties.
kauffj (Migrated from github.com) reviewed 2017-05-28 17:40:03 +02:00
@ -53,1 +62,4 @@
myClaims.add(uri)
byUri[uri] = claim
})
kauffj (Migrated from github.com) commented 2017-05-28 17:40:02 +02:00

I suspect this will cause misses, since they are not typically built with claimSequence and claimId.

I suspect this will cause misses, since they are not typically built with claimSequence and claimId.
kauffj (Migrated from github.com) reviewed 2017-05-28 17:41:26 +02:00
kauffj (Migrated from github.com) left a comment

This is a good change and could probably be shipped as-is. Just want to take one more day to think or dig a little deeper about it before merging.

This is a good change and could probably be shipped as-is. Just want to take one more day to think or dig a little deeper about it before merging.
6ea86b96 (Migrated from github.com) reviewed 2017-05-29 11:21:38 +02:00
@ -53,1 +62,4 @@
myClaims.add(uri)
byUri[uri] = claim
})
6ea86b96 (Migrated from github.com) commented 2017-05-29 11:21:38 +02:00

I think rather than misses, this is going to cause duplicates. So rather than having dupes separated into claimsByUri and myClaims now we've just moved the duplication problem into the claimsByUri object, but a step in the right direction perhaps for removing dupes?

I think long term it might be better to store claims in claims.byId and then map byUri, myClaims, etc, to claim ids.

I think rather than misses, this is going to cause duplicates. So rather than having dupes separated into `claimsByUri` and `myClaims` now we've just moved the duplication problem into the `claimsByUri` object, but a step in the right direction perhaps for removing dupes? I think long term it might be better to store claims in `claims.byId` and then map `byUri`, `myClaims`, etc, to claim ids.
6ea86b96 (Migrated from github.com) reviewed 2017-05-29 11:34:06 +02:00
@ -22,1 +21,4 @@
const { outpoint } = fileInfo
if (outpoint) newFileInfos[fileInfo.outpoint] = fileInfo
})
6ea86b96 (Migrated from github.com) commented 2017-05-29 11:34:06 +02:00

I have a file with no outpoint locally. It's one that I tried to upload but it didn't work for some reason.

I have a file with no outpoint locally. It's one that I tried to upload but it didn't work for some reason.
kauffj (Migrated from github.com) reviewed 2017-05-29 22:13:32 +02:00
@ -53,1 +62,4 @@
myClaims.add(uri)
byUri[uri] = claim
})
kauffj (Migrated from github.com) commented 2017-05-29 22:13:32 +02:00

We were saying the same thing here.

We were saying the same thing here.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#149
No description provided.