Open craigbroadbear opened 6 years ago
const zmq = require('zeromq')
Should this be const zmq = require('zmq')
instead? I'm just comparing this code to https://github.com/dashevo/bitcore-node-dash/blob/master/lib/services/bitcoind.js#L9
Can you try that and see if it works?
I tried that first, it did not work. zmq is an early version of zeromq.
It seems the Windows build has been compiled with ENABLE_ZMQ undefined.
Hey @craigbroadbear, do you know if you got the binary from the official releases at https://github.com/dashpay/dash/releases? Also, have you tried with the latest release (0.12.2.3)?
Yes that is where I downloaded from. I have tested with an old version as well as the latest, 0.12.2.3.
I tried to do a windows cross build of the latest source on linux but ran into all sorts of problems with missing libraries and whatnot. For now I am forgetting about zmq and polling the RPC port to do what i need.
Same problem here. I using windows server 2016 and Node.js v8.9.4 and zeromq 4.6.0 Dash core do not send messages to my script, while other cores(like bitcoin core , bitcoinabc ,...) working very well with my script. @craigbroadbear , For now I am forgetting about zmq and using walletnotify instead of it.
I've had this same problem before as well. I'm not compiling my own Windows builds right now so I'm working off of whatever is put on the wallets page and it doesn't currently appear to play nice with ZMQ.
My fix was just to use Linux instead 😢
Running dashd 0.12.2.1 on Windows 10. Node.js v8.9.1 npm zeromq 4.6
Any ideas? Code follows.
------------- zmqTest.js
----------- dash.conf file is: server=1 testnet=1 whitelist=0.0.0.0/0 txindex=1 addressindex=1 timestampindex=1 spentindex=1 zmqpubrawtx=tcp://127.0.0.1:18332 zmqpubrawtxlock=tcp://127.0.0.1:18332 zmqpubhashblock=tcp://127.0.0.1:18332 rpcuser=dash rpcpassword=local321 rpcport=9998 rpcallowip=0.0.0.0/0 uacomment=bitcore debug=zmq