Merge pull request #45 from fanatid/filteradd

Fix filteradd in Message.COMMANDS
This commit is contained in:
Manuel Aráoz 2015-03-04 15:21:51 -03:00
commit b7f4d5cb60
2 changed files with 7 additions and 1 deletions

View File

@ -927,7 +927,7 @@ FilterAdd.prototype.getPayload = function() {
return bw.concat();
};
module.exports.FilterAdd = Message.COMMANDS.filterload = FilterAdd;
module.exports.FilterAdd = Message.COMMANDS.filteradd = FilterAdd;
/**
* Request peer to apply a bloom filter to 'inv' messages sent back

View File

@ -46,9 +46,15 @@ describe('Messages', function() {
names.forEach(function(name) {
var command = commands[name];
var data = Data[command.toUpperCase()];
it('should have data for ' + name, function() {
should.exist(data);
});
it('command for name ' + name, function() {
Messages.Message.COMMANDS[command].should.equal(Messages[name]);
});
describe(name, function() {
var message = new Messages[name]();
it('should be able to create instance', function() {