-
Notifications
You must be signed in to change notification settings - Fork 457
Remove insecure endpoints - Closes #457 #676
Conversation
30d4253
to
097fba8
Compare
library.logger.debug('Received transaction ' + transaction.id + ' from public client'); | ||
} else { | ||
library.logger.debug('Received transaction ' + transaction.id + ' from peer ' + library.logic.peers.peersManager.getAddress(peer.nonce)); | ||
} |
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.
I like this quite a bit!
@@ -77,6 +73,20 @@ describe('postTransactions', function () { | |||
secret: node.gAccount.password, | |||
amount: 100000000000, | |||
recipientId: account.address | |||
}, function (err, res) { | |||
node.expect(err).to.be.null; | |||
node.onNewBlock(done); |
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.
Could be fragile
- apply signatures tests in transport layer - rename transport layer tests from peers prefix - use lisk-js in functional tests when necessary
097fba8
to
2ec7272
Compare
- use prototype in peersManager - don't use acceptable in returning peers list - use self.findGoodPeers in loader - introduce updatePeerStatus function
- apply signatures tests in transport layer - rename transport layer tests from peers prefix - use lisk-js in functional tests when necessary
…nto 457-remove-insecure-endpoints # Conflicts: # test/unit/logic/transaction.js
92060ee
to
fe0153d
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.
API documentation from files needs to be updated.
- add missing transport tests - add structure for tests in transport.transaction.main - remove tests relying on public endpoints
fe0153d
to
fc68a1c
Compare
7fe9860
to
253a9cc
Compare
253a9cc
to
5aaffdb
Compare
bb71a5e
to
e841ac2
Compare
60e15f5
to
475992d
Compare
…emove-insecure-endpoints
14b3acb
to
19363c8
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.
Minor logging changes. I am open for discussion on the wording but these need to be a bit more verbose.
modules/multisignatures.js
Outdated
@@ -63,6 +63,9 @@ function Multisignatures (cb, scope) { | |||
* @todo test function!. | |||
*/ | |||
Multisignatures.prototype.processSignature = function (tx, cb) { | |||
if (!tx) { | |||
return setImmediate(cb, 'Cannot process an empty signature.'); |
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.
Unable to process signature. Signature is undefined.
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.
something like this. Not sure on the wording myself.
modules/transport.js
Outdated
@@ -195,6 +197,9 @@ __private.receiveTransactions = function (query, peer, extraLogMessage, cb) { | |||
transactions = query.transactions; | |||
|
|||
async.eachSeries(transactions, function (transaction, eachSeriesCb) { | |||
if (!transaction) { | |||
return setImmediate(eachSeriesCb, 'Cannot receive empty transaction'); |
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.
Unable to process signature. Signature is undefined.
return trs; | ||
}; | ||
|
||
/** | ||
* Obtains constant fee secondsignature. |
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.
secondSignature
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.
This implies several changes coming from the helper constants. @Isabello Shall we follow the same pattern to multiSignature
? https://github.com/LiskHQ/lisk/blob/457-remove-insecure-endpoints/helpers/constants.js#L15
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.
Ah damn. No lets not change this until later. Please log an issue about standardizing it to be camelCase if you don't mind.
remove insecure endpoints and move corresponding tests:
transport
prefixcloses #457