Browse Source

Added net & tls to client constructor in client.js & electrum_client.js.

get-transaction-merkle
Corey Phillips 4 years ago
parent
commit
d037dc1a18
No known key found for this signature in database GPG Key ID: 80C0975F55D3A07B
  1. 6
      lib/client.js
  2. 4
      lib/electrum_client.js

6
lib/client.js

@ -5,13 +5,15 @@ const initSocket = require('./init_socket');
const connectSocket = require('./connect_socket');
class Client {
constructor(port, host, protocol = 'tcp', options = void 0) {
constructor(port, host, protocol = 'tcp', net, tls) {
this.net = net;
this.tls = tls;
this.id = 0;
this.port = port;
this.host = host;
this.callback_message_queue = {};
this.subscribe = new EventEmitter();
this.conn = initSocket(this, protocol, options);
this.conn = initSocket(this, protocol);
this.mp = new util.MessageParser((body, n) => {
this.onMessage(body, n);
});

4
lib/electrum_client.js

@ -1,8 +1,8 @@
const Client = require("./client")
class ElectrumClient extends Client{
constructor(port, host, protocol, options){
super(port, host, protocol, options);
constructor(port, host, protocol, net, tls){
super(port, host, protocol, net, tls);
}
onClose(){
super.onClose()

Loading…
Cancel
Save