Sync stop unfinished and the node start with 11% of the blockchain
Created by: M5oul
With Duniter Desktop 0.22.0 and a bad connection, which surely had been cut, I sync from zero my node, a timeout happen and the sync stopped and the node is launched:
2016-08-10T17:45:01+02:00 - debug: Peer 9bZEAT is on same blockchain
2016-08-10T17:45:01+02:00 - info: Getting chunck from 3000 to 3500
2016-08-10T17:45:02+02:00 - debug: 2500
2016-08-10T17:45:02+02:00 - info: Downloaded 8%, Applied 10%
2016-08-10T17:45:09+02:00 - info: Downloaded 10%, Applied 10%
2016-08-10T17:45:09+02:00 - debug: dl starts from 3500
2016-08-10T17:45:09+02:00 - debug: apply starts from 3000
2016-08-10T17:45:09+02:00 - debug: Applying from 3000
2016-08-10T17:45:09+02:00 - debug: Peer 9bZEAT is on same blockchain
2016-08-10T17:45:09+02:00 - info: Getting chunck from 3500 to 4000
2016-08-10T17:45:09+02:00 - debug: 3000
2016-08-10T17:45:09+02:00 - info: Downloaded 10%, Applied 11%
2016-08-10T17:45:11+02:00 - info: ETIMEDOUT
2016-08-10T17:45:11+02:00 - error: Error: ETIMEDOUT
at Timeout._onTimeout (/home/moul/projects/duniter/sources/node_modules/vucoin/node_modules/request/request.js:761:15)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)
2016-08-10T17:45:11+02:00 - warn: ETIMEDOUT
2016-08-10T17:45:11+02:00 - info: External access: 83.197.194.85:46608
2016-08-10T17:45:11+02:00 - debug: Generating server's peering entry based on block#469...
2016-08-10T17:45:11+02:00 - debug: Document write error: Signature from a peer must match
2016-08-10T17:45:11+02:00 - error: TypeError: Cannot set property 'documentType' of undefined
at /home/moul/projects/duniter/sources/app/service/PeeringService.js:281:27
at next (native)
at onFulfilled (/home/moul/projects/duniter/sources/node_modules/co/index.js:65:19)
at process._tickCallback (internal/process/next_tick.js:103:7)
2016-08-10T17:45:11+02:00 - warn: Cannot set property 'documentType' of undefined
2016-08-10T17:52:55+02:00 - info: Duniter server listening on http://192.168.0.10:46608
2016-08-10T17:52:55+02:00 - info: Duniter server listening on http://::1:46608
2016-08-10T17:52:55+02:00 - info: Node version: 0.22.0
2016-08-10T17:52:55+02:00 - info: Node pubkey: AySm48XnZ1XqLJwhGtA5MqA24FGdvMDPkEg3zjARTXHc
2016-08-10T17:52:55+02:00 - info: Crawling the network...
2016-08-10T17:52:55+02:00 - warn: Local node is not a member. Waiting to be a member before computation a block.
2016-08-10T17:52:55+02:00 - info: Crawling done.
2016-08-10T17:52:55+02:00 - info: Storing self peer...
2016-08-10T17:52:55+02:00 - info: External access: 83.197.194.85:46608
2016-08-10T17:52:55+02:00 - debug: Generating server's peering entry based on block#469...
2016-08-10T17:52:55+02:00 - debug: Document write error: Signature from a peer must match
2016-08-10T17:52:55+02:00 - error: TypeError: Cannot set property 'documentType' of undefined
at /home/moul/projects/duniter/sources/app/service/PeeringService.js:281:27
at next (native)
at onFulfilled (/home/moul/projects/duniter/sources/node_modules/co/index.js:65:19)
at process._tickCallback (internal/process/next_tick.js:103:7)
2016-08-10T17:52:55+02:00 - warn: Cannot set property 'documentType' of undefined
A solution could be to check all the blockchain is present before launching the node. If not, display a message or retry sync. Sync could be enhanced.