Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: CoreReplicationState Add a new CoreReplicationState implementation, see #287 * cleanup and simplify * derive state * Add missing and connected & cleanup * Move exported class to top * cache derived state * Add code comments * add benchmarks * entries -> for index, 4,150ms -> 2,500ms Use `for(let j = 0; j < peers.length ...` instead of `peers.entries()` * re-used haves/wants arrays, 2500ms -> 2300ms * Remove wants array, 2300ms -> 2180ms * deriveState unit tests * bitwise operations, 1500ms -> ~90ms * increase benchmark iterations for better accuracy * Update src/core-manager/core-replication-state.js Co-authored-by: Andrew Chou <andrewchou@fastmail.com> * fixes * wip tests * fix prehave test * fix failing test * bitcount test * add some additional code comments --------- Co-authored-by: Andrew Chou <andrewchou@fastmail.com>
- Loading branch information