"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sendRequests = exports.queueRequest = exports.parseRecord = exports.updateRecord = exports.dropInvalidTxs = exports.getTxs = exports.reset = exports.init = void 0;
const Context_1 = require("./Context");
/** STATE */
let p2pLogger;
/** ROUTES */
/*
const gossipRoute: P2P.P2PTypes.GossipHandler = (payload) => {}

const routes = {
  internal: {},
  gossip: {
    gossip: gossipRoute,
  },
}
*/
/** FUNCTIONS */
/** CycleCreator Functions */
/* These functions must be defined by all modules that implement a
     network action like going active, lost node detection, etc.
     These functions are called by CycleCreator
*/
function init() {
    // Init logger
    p2pLogger = Context_1.logger.getLogger('p2p');
    // Init state
    reset();
    // Register routes
    /*
    for (const [name, handler] of Object.entries(routes.internal)) {
      Comms.registerInternal(name, handler)
    }
    for (const [name, handler] of Object.entries(routes.gossip)) {
      Comms.registerGossipHandler(name, handler)
    }
    */
}
exports.init = init;
function reset() { }
exports.reset = reset;
function getTxs() {
    return;
}
exports.getTxs = getTxs;
function dropInvalidTxs(txs) {
    return;
}
exports.dropInvalidTxs = dropInvalidTxs;
/*
Given the txs and prev cycle record mutate the referenced record
*/
function updateRecord(txs, record, prev) { }
exports.updateRecord = updateRecord;
function parseRecord(record) {
    return;
}
exports.parseRecord = parseRecord;
function queueRequest(request) { }
exports.queueRequest = queueRequest;
function sendRequests() { }
exports.sendRequests = sendRequests;
/** Module Functions */
function info(...msg) {
    const entry = `[CHANGE ME]: ${msg.join(' ')}`;
    p2pLogger.info(entry);
}
function warn(...msg) {
    const entry = `[CHANGE ME]: ${msg.join(' ')}`;
    p2pLogger.warn(entry);
}
function error(...msg) {
    const entry = `[CHANGE ME]: ${msg.join(' ')}`;
    p2pLogger.error(entry);
}
//# sourceMappingURL=Template.js.map