OSDN Git Service

add fast sync func (#204)
authoryahtoo <yahtoo.ma@gmail.com>
Tue, 25 Jun 2019 10:30:38 +0000 (18:30 +0800)
committerPaladz <yzhu101@uottawa.ca>
Tue, 25 Jun 2019 10:30:38 +0000 (18:30 +0800)
commit4607cea3c6d3b1501ae1edb2c078b9ae0ee4bc79
tree1a631a628c20cd3aff72add1df59de07867aca13
parent3bbfe8df7c889d27f65c803d6baf4267db8694c6
add fast sync func (#204)

* Modify fast sync function

* Fix GetHeadersMessage error

* Fix skeleton init error

* Fix fetchHeaders error

* Add fetch date finish check

* Fix FetchBodiesTask error

* Fix fetchBodies bug

* Add multi-peer fetch support

* Fix requireHeaders bug

* add lit fast sync func

* Fix fetchBlocks bug

* opz code format

* del test file

* opz code

* Add test case

* change to singe peer fast sync

* Fix bug

* Add peer exception handle

* del unused code

* Add test case

* Fix review bug

* Fix locate headers error

* Fix test file error

* Add irreversible block fast sync

* Fix test err

* Fix review bug
13 files changed:
netsync/chainmgr/block_keeper.go
netsync/chainmgr/block_keeper_test.go
netsync/chainmgr/fast_sync.go [new file with mode: 0644]
netsync/chainmgr/fast_sync_test.go [new file with mode: 0644]
netsync/chainmgr/handle.go
netsync/chainmgr/msg_fetcher.go [new file with mode: 0644]
netsync/chainmgr/protocol_reactor.go
netsync/chainmgr/tool_test.go
netsync/messages/chain_msg.go
netsync/messages/chain_msg_test.go
netsync/peers/peer.go
protocol/protocol.go
test/mock/chain.go