Track user's participated blockcount #306
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
parasitepool/para!306
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "parabit/track-user-participated-blocks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -387,3 +354,1 @@ELSE accounts.lnurl_updated_atEND,updated_at = NOW();INSERT INTO accounts (username, lnurl, past_lnurls, total_diff, created_at, updated_at)Only the final part (referencing account_metadata) is changed, rest just had indentation fixed.
@ -804,0 +802,4 @@if share.result == Some(true) {if let Some(diff) = share.diff {entry.total_diff += diff;}Typically, this will only be a single block, but there is an edge-case (one of the two causes of duplicate counts) where we send records from more than one block.
Two is better as we get an explicit per-query error. If we were performance constrained then this may be an area for some improvement.
The sending side sends blocks in order. It is possible for blocks to come in out of order, but would require a server to fall behing on sync while a reorg was happening for it to impact this. The effect would be that all users would be missing one point (which can be corrected by running the migration/refresh).
@ -844,6 +849,39 @@ impl Server {.execute(&mut *tx)Yes we can 😂