-
Notifications
You must be signed in to change notification settings - Fork 456
Peers communication protocol change to WS - Closes #446 #660
Conversation
- use prototype in peersManager - don't use acceptable in returning peers list - use self.findGoodPeers in loader - introduce updatePeerStatus function - remove setIntervals logs from peers module - fixed syntax errors - calculate consensus using random order of peers - discover new peers every 60s instead of 10s - remove peers ping function
af4dc5d
to
d416fef
Compare
# Conflicts: # test/common/initModule.js
37657d4
to
10ddcfd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! It looks great!
test is failing: see logs: https://jenkins.lisk.io/job/Lisk-Pipeline/job/PR-660/35/execution/node/240/log/ |
1d20373
to
60e15f5
Compare
- fix remaining issues with other unit tests failing - correct ports switching in config.non-forge.json - recover blocks cache functional tests - fix tests after object stub removal - use ws post in accounts logic unit test
also: - remove remaining console.logs - switch http and ws ports in objectStubs
60e15f5
to
475992d
Compare
appName: 'lisk', | ||
workerController: workersController.path, | ||
perMessageDeflate: false, | ||
secretKey: 'liskSecretKey', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks.
@@ -150,7 +147,7 @@ Process.prototype.loadBlocksOffset = function (limit, offset, verify, cb) { | |||
var params = { limit: newLimit, offset: offset || 0 }; | |||
|
|||
library.logger.debug('Loading blocks offset', {limit: limit, offset: offset, verify: verify}); | |||
// Execute in sequence via dbSequence | |||
// Execute in sequence via dbSequence] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
@@ -209,29 +206,22 @@ Process.prototype.loadBlocksOffset = function (limit, offset, verify, cb) { | |||
* @return {Object} cb.lastValidBlock Normalized new last block | |||
*/ | |||
Process.prototype.loadBlocksFromPeer = function (peer, cb) { | |||
// Set current last block as last valid block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove that and other comments below, they are no longer valid?
@@ -107,7 +125,7 @@ __private.getByFilter = function (filter, cb) { | |||
}; | |||
|
|||
// Apply filters (by AND) | |||
var peers = library.logic.peers.list(true); | |||
var peers = library.logic.peers.list(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, but from that list API response is generated, isn't it? So API response will contain that RPC property and not contains properties that library.logic.peers.list(true);
is normalizing. Please check that.
Change peer communication protocol from HTTP to web socket.
Implementation is close connected to newly created library - wamp-socket-cluster. Please review also changes made there.
Previous PR: #580
Closes #446