P2pool util forest: Difference between revisions
Jump to navigation
Jump to search
described deltas |
|||
Line 9: | Line 9: | ||
# reverse_delta_refs ( delta.tail -> ref) | # reverse_delta_refs ( delta.tail -> ref) | ||
Deltas are used for quickly answering queries by caching data between two points in the sharechain. Each share has a delta that goes between it and its highest parent and contains information such as how much work was done and how many shares are in between. If the highest parent has its parent added, the delta will keep referring to the old highest parent until it is next needed, and then it will be updated. | |||
===Method add=== | ===Method add=== | ||
Adds a share to the tracker | Adds a share to the tracker |
Revision as of 21:37, 24 June 2012
This contains code for tracking shares.
Class Tracker
Number of dictionaries that store the shares in various ways to allow fast access.
- shares (hash->share) Since share contains parent share allows you to link to previous shares all the way to the tail.
- reverse_shares (delta.tail->set of share_hashes) Allows you to link share to the next share that came after it all the way to the head.
- deltas (share_hash -> delta, ref)
- reverse_deltas (ref -> set of share_hashes)
- delta_refs (ref -> delta)
- reverse_delta_refs ( delta.tail -> ref)
Deltas are used for quickly answering queries by caching data between two points in the sharechain. Each share has a delta that goes between it and its highest parent and contains information such as how much work was done and how many shares are in between. If the highest parent has its parent added, the delta will keep referring to the old highest parent until it is next needed, and then it will be updated.
Method add
Adds a share to the tracker