/* eslint-disable indent, id-length, camelcase */
function getMempoolInfo() {
  return {
    result: {
      size: 4524,
      bytes: 2071293,
      usage: 6141256,
      maxmempool: 20000000,
      mempoolminfee: 0.00000001,
      minrelaytxfee: 0.00000001,
    }
  };
}

function getNetworkInfoWithTor() {
  return {
    result: {
      version: 170100,
      subversion: '/Satoshi:0.17.1/',
      protocolversion: 70015,
      localservices: '000000000000040d',
      localrelay: true,
      timeoffset: -1,
      networkactive: true,
      connections: 10,
      networks: [
        {
          name: 'ipv4',
          limited: false,
          reachable: true,
          proxy: '127.0.0.1:9050',
          proxy_randomize_credentials: true,
        },
        {
          name: 'ipv6',
          limited: false,
          reachable: true,
          proxy: '127.0.0.1:9050',
          proxy_randomize_credentials: true,
        },
        {
          name: 'onion',
          limited: false,
          reachable: true,
          proxy: '127.0.0.1:9050',
          proxy_randomize_credentials: true,
        }
      ],
      relayfee: 0.00001000,
      incrementalfee: 0.00001000,
      localaddresses: [
        {
          address: 'zfd4bzpkmr3zqxs3.onion',
          port: 8333,
          score: 14
        }
      ],
      warnings: '',
    }
  };
}

function getNetworkInfoWithoutTor() {
  return {
    result: {
      version: 170100,
      subversion: '/Satoshi:0.17.1/',
      protocolversion: 70015,
      localservices: '000000000000040d',
      localrelay: true,
      timeoffset: -1,
      networkactive: true,
      connections: 10,
      networks: [
        {
          name: 'ipv4',
          limited: false,
          reachable: true,
          proxy: '127.0.0.1:9050',
          proxy_randomize_credentials: true,
        },
        {
          name: 'ipv6',
          limited: false,
          reachable: true,
          proxy: '127.0.0.1:9050',
          proxy_randomize_credentials: true,
        },
        {
          name: 'onion',
          limited: true,
          reachable: false,
          proxy: '',
          proxy_randomize_credentials: false,
        }
      ],
      relayfee: 0.00001000,
      incrementalfee: 0.00001000,
      localaddresses: [],
      warnings: '',
    }
  };
}

function getPeerInfo() {
  return {
    result:
      [{
        id: 0,
        addr: '18.212.212.24:18333',
        addrlocal: '10.11.12.13:10249',
        addrbind: '10.12.4.104:45686',
        services: '000000000000000d',
        relaytxes: true,
        lastsend: 1540495700,
        lastrecv: 1540495674,
        bytessent: 16610,
        bytesrecv: 65062,
        conntime: 1540491274,
        timeoffset: 0,
        pingtime: 0.066499,
        minping: 0.065828,
        version: 70015,
        subver: '/Satoshi:0.13.2/',
        inbound: false,
        addnode: false,
        startingheight: 1440561,
        banscore: 0,
        syncedHeaders: 1440563,
        syncedBlocks: 1440563,
        inflight: [],
        whitelisted: false,
      },
        {
          id: 1,
          addr: '122.128.107.148:18333',
          addrlocal: '10.11.12.13:47083',
          addrbind: '10.12.4.104:41318',
          services: '000000000000000d',
          relaytxes: true,
          lastsend: 1540495700,
          lastrecv: 1540495685,
          bytessent: 14855,
          bytesrecv: 46473,
          conntime: 1540491281,
          timeoffset: 0,
          pingtime: 0.161769,
          minping: 0.160893,
          version: 70015,
          subver: '/Satoshi:0.15.1/',
          inbound: false,
          addnode: false,
          startingheight: 1440561,
          banscore: 0,
          syncedHeaders: 1440567,
          syncedBlocks: 1440567,
          inflight: [],
          whitelisted: false,
        },
        {
          id: 4,
          addr: '94.130.201.174:18333',
          addrlocal: '10.11.12.13:51897',
          addrbind: '10.12.4.104:60258',
          services: '000000000000040d',
          relaytxes: true,
          lastsend: 1540495700,
          lastrecv: 1540495694,
          bytessent: 15972,
          bytesrecv: 48829,
          conntime: 1540491320,
          timeoffset: 0,
          pingtime: 0.189388,
          minping: 0.188924,
          version: 70015,
          subver: '/Satoshi:0.17.0/',
          inbound: false,
          addnode: false,
          startingheight: 1440561,
          banscore: 0,
          syncedHeaders: 1440567,
          syncedBlocks: 1440567,
          inflight: [],
          whitelisted: false,
        },
        {
          id: 5,
          addr: '5.189.173.60:18333',
          addrlocal: '10.11.12.13:27348',
          addrbind: '10.12.4.104:41220',
          services: '000000000000040d',
          relaytxes: true,
          lastsend: 1540495700,
          lastrecv: 1540495693,
          bytessent: 14511,
          bytesrecv: 48206,
          conntime: 1540491320,
          timeoffset: -1,
          pingtime: 0.159785,
          minping: 0.15948,
          version: 70015,
          subver: '/Satoshi:0.17.99/',
          inbound: false,
          addnode: false,
          startingheight: 1440561,
          banscore: 0,
          syncedHeaders: 1440567,
          syncedBlocks: 1440567,
          inflight: [],
          whitelisted: false,
        },
        {
          id: 6,
          addr: '142.93.121.198:18333',
          addrlocal: '10.11.12.13:35127',
          addrbind: '10.12.4.104:33322',
          services: '000000000000040d',
          relaytxes: true,
          lastsend: 1540495699,
          lastrecv: 1540495699,
          bytessent: 15185,
          bytesrecv: 52568,
          conntime: 1540491332,
          timeoffset: 0,
          pingtime: 0.070795,
          minping: 0.070323,
          version: 70015,
          subver: '/Satoshi:0.16.2/',
          inbound: false,
          addnode: false,
          startingheight: 1440561,
          banscore: 0,
          syncedHeaders: 1440567,
          syncedBlocks: 1440567,
          inflight: [],
          whitelisted: false,
        },
        {
          id: 7,
          addr: '159.65.202.252:18333',
          addrlocal: '10.11.12.13:21101',
          addrbind: '10.12.4.104:57942',
          services: '000000000000040d',
          relaytxes: true,
          lastsend: 1540495700,
          lastrecv: 1540495692,
          bytessent: 16334,
          bytesrecv: 50973,
          conntime: 1540491334,
          timeoffset: 0,
          pingtime: 0.150593,
          minping: 0.150379,
          version: 70015,
          subver: '/Satoshi:0.16.0/',
          inbound: false,
          addnode: false,
          startingheight: 1440561,
          banscore: 0,
          syncedHeaders: 1440567,
          syncedBlocks: 1440567,
          inflight: [],
          whitelisted: false,
        },
        {
          id: 8,
          addr: '206.189.39.36:18333',
          addrlocal: '10.11.12.13:24189',
          addrbind: '10.12.4.104:39760',
          services: '000000000000040d',
          relaytxes: true,
          lastsend: 1540495684,
          lastrecv: 1540495701,
          bytessent: 10896,
          bytesrecv: 50807,
          conntime: 1540492619,
          timeoffset: 0,
          pingtime: 0.17156,
          minping: 0.171309,
          version: 70015,
          subver: '/Satoshi:0.16.2/',
          inbound: false,
          addnode: false,
          startingheight: 1440562,
          banscore: 0,
          syncedHeaders: 1440567,
          syncedBlocks: 1440567,
          inflight: [],
          whitelisted: false,
        },
        {
          id: 9,
          addr: '92.53.89.123:18333',
          addrlocal: '10.11.12.13:25479',
          addrbind: '10.12.4.104:39574',
          services: '000000000000040d',
          relaytxes: true,
          lastsend: 1540495700,
          lastrecv: 1540495678,
          bytessent: 11274,
          bytesrecv: 44787,
          conntime: 1540492620,
          timeoffset: 0,
          pingtime: 0.181107,
          minping: 0.180474,
          version: 70015,
          subver: '/Satoshi:0.17.0/',
          inbound: false,
          addnode: false,
          startingheight: 1440562,
          banscore: 0,
          syncedHeaders: 1440567,
          syncedBlocks: 1440567,
          inflight: [],
          whitelisted: false,
        }],
    error: null,
    id: 56305
  };
}

function getPeerInfoEmpty() {
  return {
    result:
      []
  };
}

module.exports = {
  getMempoolInfo,
  getNetworkInfoWithTor,
  getNetworkInfoWithoutTor,
  getPeerInfo,
  getPeerInfoEmpty,
};
