added peerTester checkers for requests and poolTester checker for blockChain to simplify testing
simplify test code for TestSimpleChain
Single and MultiSection simple Chains tests pass
- reimplemented waiters
- simplify tests
- consistent naming throughout
- quick and safe chain insertion at the root of the blockpool
blockpool fixes
- add tests for repeated addPeer calls from same peer (new block msg, update td/current block)
- correct cycle control when known chain is activated
- extract addChain as separate function
- kill section only stops the section process if reached youngest node
- tests: blocks requests now do not assume fix structure, just check if all blocks to be sent are actually requested
- add TestMidChainNewBlock to test if in the middle of download the peer finds a new block
blockpool testing
- blockchain helper func
- add tests for peer switch middle of download
peer switch tests
better tests and fixes
- shorter request intervals for quick testing
- verbose debugging logs
- fix cycle control used in testing
- fix returned length of inserted chain
- fixed nil pointer bug in link func that handle chainforks
- TestMidChainPeerBestAgain added to test process caching for peers
- cleanup tests and consistently call addHashes and addBlocks in a go routine