Commit Graph

5 Commits

Author SHA1 Message Date
Zahary Karadjov 0300ebdb14 Fix the nimbus build 2019-01-06 12:03:10 +02:00
Ștefan Talpalaru be476feeec
better error handling
- changed the logging level of some messages that should not appear by
  default in a debug build
- most errors in persistWorkItem() are gracefully recovered from
- fixed the handling of out of order blocks
- dropped work items with fewer blocks than what we requested
- getBestBlockNumber(): log and allow exceptions from getBlockHeaders()
- obtainBlocksFromPeer(): moved here the check for block numbers being
  in sequence (from nimbus/p2p/chain.nim)
- sendMsg(): log and catch exceptions in callers
2018-12-17 23:35:45 +01:00
cheatfate 84184221ad Fix #47. 2018-10-22 11:52:14 +03:00
Zahary Karadjov 7828ef0481 Initial implementation of the LES protocol and its flow control.
This also restores the old module structure of having separate
`peer_pool` and `rlpx` modules. This is made possible by the
new Nim package `package_visible_types` (please refer to its
README for an explanation).

Also introduces more error handling in the low-level RLPx routines.
All detected errors will result in immediate disconnection of the
corresponding peer, which may be detected in the protocols though
the `onPeerDisconnected` event handler.
2018-10-16 02:52:11 +03:00
Zahary Karadjov b38804f873 This commit only moves files around (no need for review)
In the next commit, I'm going to squash all the changes in the LES.
This commit just sets the directory tree to its final state, so the
diffs in the follow up commits are easier to review.

Please note that eth.nim was renamed to eth_protocol.nim, because
it's not advisable to have a module name that shares the name of
a protocol identifier (this creates hard to figure out ambiguity
errors)
2018-10-15 16:49:49 +03:00