From b473b65207f4d6e70ec514d57b3487e367b53256 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Tue, 5 Apr 2016 14:50:49 -0400 Subject: [PATCH] bitcoind: fix tx event to include tx buffer --- lib/services/bitcoind.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/services/bitcoind.js b/lib/services/bitcoind.js index 1ef76e90..0f12f10b 100644 --- a/lib/services/bitcoind.js +++ b/lib/services/bitcoind.js @@ -125,9 +125,9 @@ Bitcoin.prototype._loadConfiguration = function() { ); $.checkState( - this.configuration.zmqpubhashtx, - '"zmqpubhashtx" option is required to get event updates from bitcoind. ' + - 'Please add "zmqpubhashtx=tcp://127.0.0.1:" to your configuration and restart' + this.configuration.zmqpubrawtx, + '"zmqpubrawtx" option is required to get event updates from bitcoind. ' + + 'Please add "zmqpubrawtx=tcp://127.0.0.1:" to your configuration and restart' ); $.checkState( @@ -157,12 +157,12 @@ Bitcoin.prototype._registerEventHandlers = function() { var self = this; this.zmqSubSocket.subscribe('hashblock'); - this.zmqSubSocket.subscribe('hashtx'); + this.zmqSubSocket.subscribe('rawtx'); this.zmqSubSocket.on('message', function(topic, message) { var topicString = topic.toString('utf8'); - if (topicString === 'hashtx') { - self.emit('tx', message.toString('hex')); + if (topicString === 'rawtx') { + self.emit('tx', message); } else if (topicString === 'hashblock') { self._resetCaches(); self.tiphash = message.toString('hex'); @@ -291,7 +291,7 @@ Bitcoin.prototype.start = function(callback) { }); self.zmqSubSocket.monitor(500, 0); - self.zmqSubSocket.connect(self.configuration.zmqpubhashtx); + self.zmqSubSocket.connect(self.configuration.zmqpubrawtx); if (self._reindex) { var interval = setInterval(function() {