-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make the insane sync implementation a little more readable * Remove leftover log files * Remove useless lock * allocate slice with known size * reorder code * move SyncPeer to separate file * fetch peer's Number atomically; remove redundant cast * change if statement to use <= (earleir impl) * simplify popBlock loop * Fix minor allocation bug * implement pruning od blocks from peers * revert purgeBlocks() on start of WatchSyncWithPeer * refactor popBlock method * make enqueueCh buffered * rollback to merge commit * * implement prunePeerEnqueuedBlocks * this method clears old blocks from all peers' queues * prune old blocks when commiting a block (BulkSyncWithPeer, WatchSyncWithPeer) * execute callback handler first, then check if * implement depented popBlock timeout based on configured block production time * fix linter * reduce popTimeout factor (5 -> 3) * notify peers of new block asynchronously * use synchronous Broadcast in tests (SyncBroadcast) * Fix typo in log message * Standardize errors in the skeleton package * Simplify conditional in syncer * Enforce minimum block time * Allocate the exact number of header objects * Define constant for timeout * Rename break variable * Simplify fromProto methods in syncer * add break statement in for loop * simplify if in enqueueBlock Co-authored-by: dbrajovic <[email protected]>
- Loading branch information
1 parent
d3002b4
commit f73da20
Showing
10 changed files
with
407 additions
and
505 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
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.