diff options
author | Sonic <sonic@dexon.org> | 2018-12-05 15:17:38 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | c3d28a2f4d12c98b41d3a874a040489ab0a91ba5 (patch) | |
tree | db6c05e32bede6c28b1d9c1b31e38941287d2960 /dex/cache_test.go | |
parent | c727f18cf6c9f6f1701040ad6dc4e5adea192db8 (diff) | |
download | dexon-c3d28a2f4d12c98b41d3a874a040489ab0a91ba5.tar dexon-c3d28a2f4d12c98b41d3a874a040489ab0a91ba5.tar.gz dexon-c3d28a2f4d12c98b41d3a874a040489ab0a91ba5.tar.bz2 dexon-c3d28a2f4d12c98b41d3a874a040489ab0a91ba5.tar.lz dexon-c3d28a2f4d12c98b41d3a874a040489ab0a91ba5.tar.xz dexon-c3d28a2f4d12c98b41d3a874a040489ab0a91ba5.tar.zst dexon-c3d28a2f4d12c98b41d3a874a040489ab0a91ba5.zip |
core, dex: polish sync (#75)
- Broadcasting blocks at chain head event is not correct when the full
node is not running in block proposer mode. Introduce NewFinalizedBlockEvent,
this event is post by the full node which runs in block proposer mode when a
block is witnessed and resulting in some blocks are considered finalized.
- Non block proposer node will still broadcast blocks
at the following moment (same as ethereum):
1. a sync with a peer is terminated successfully
2. a block passes the fetcher's header check during inserting blocks
3. a block is successfully inserted by fetcher
- Don't trigger a sync when we are not behind other peers more than
acceptable distance. Fetcher is able to cover this.
Diffstat (limited to 'dex/cache_test.go')
0 files changed, 0 insertions, 0 deletions