-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a header and block cache. (#188)
* Add blockheader and block cache * Rig up block and header cache setters/getters * Remove blocks missing cache since the height mapping is now cached via header cache * Move peer manager out of db * tbc: move peer management to separate type/file * ristretto makes my gums bleed; try lru despite being a generic turd * tbc: use rlock/unlock for rwmutex in peer manager * tbc: fix slice length in PeersRandom and append in handleAddr(V2) * Make cache setable * catch ctx cancel *shakesfistatwire* * remove unused error * fixup fallout from lru configuration * Add option to disable LRU block and header cache * tbcd: add BlockCache and BlockheaderCache to default config --------- Co-authored-by: Joshua Sing <joshua@bloq.com>
- Loading branch information
1 parent
ccaf4d7
commit 95925bd
Showing
10 changed files
with
336 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.