send block and merkleblock packets correctly.

This commit is contained in:
Christopher Jeffrey 2015-12-23 19:56:33 -08:00
parent b77c34789e
commit f3ae1c517a

View File

@ -343,13 +343,13 @@ Framer.block = function _block(block, type) {
};
Framer.prototype.block = function _block(block) {
return this.packet(Framer.block(block, 'block'));
return this.packet('block', Framer.block(block, 'block'));
};
Framer.prototype.merkleBlock = function merkleBlock(block) {
// XXX Technically we're also supposed to send `tx` packets accompanying the
// merkleblock here if we have them, as per the offical bitcoin client.
return this.packet(Framer.block(block, 'merkleblock'));
return this.packet('merkleblock', Framer.block(block, 'merkleblock'));
};
Framer.prototype.addr = function addr(peers) {