Added more test to Wallet

This commit is contained in:
Matias Pando 2015-01-19 18:32:34 -03:00
commit bf82fa0760
2 changed files with 222 additions and 0 deletions

View file

@ -713,6 +713,10 @@ Wallet.prototype._onData = function(senderId, data, ts) {
this.updateSyncedTimestamp(ts);
console.log('data.type ', data.type);
console.log('this.id ', this.id);
console.log('data.walletId ', data.walletId);
if (data.type !== 'walletId' && this.id !== data.walletId) {
log.debug('Wallet:' + this.id + ' Received corrupt message:', data)
this.emitAndKeepAlive('corrupt', senderId);