<commit_before>'use strict';

// server-side socket behaviour
// io is a variable already taken in express
var ios = null;

module.exports.init = function(app, io_ext) {
  ios = io_ext;
  ios.set('log level', 1); // reduce logging
  ios.sockets.on('connection', function(socket) {
    socket.on('subscribe', function(topic) {
      console.log('subscribe to '+topic);
      socket.join(topic);
    });
  });
};

module.exports.broadcast_tx = function(tx) {
  ios.sockets.in('inv').emit('tx', tx);
};

module.exports.broadcast_block = function(block) {
  ios.sockets.in('inv').emit('block', block);
};

module.exports.broadcast_address_tx = function(address, tx) {
  console.log('sending address tx '+address+' '+tx);
  ios.sockets.in(address).emit('atx', tx);
};<commit_msg>remove log<commit_after>'use strict';

// server-side socket behaviour
// io is a variable already taken in express
var ios = null;

module.exports.init = function(app, io_ext) {
  ios = io_ext;
  ios.set('log level', 1); // reduce logging
  ios.sockets.on('connection', function(socket) {
    socket.on('subscribe', function(topic) {
      console.log('subscribe to '+topic);
      socket.join(topic);
    });
  });
};

module.exports.broadcast_tx = function(tx) {
  ios.sockets.in('inv').emit('tx', tx);
};

module.exports.broadcast_block = function(block) {
  ios.sockets.in('inv').emit('block', block);
};

module.exports.broadcast_address_tx = function(address, tx) {
  ios.sockets.in(address).emit('atx', tx);
};
{'fraction_non_alphanumeric': 0.18029490616621985, 'fraction_numerical': 0.0013404825737265416, 'mean_word_length': 4.294326241134752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4479198', 'n_tokens_mistral': 518, 'n_tokens_neox': 500, 'n_words': 100}