Browse Source

Remove custom hex function at networks.js

patch-2
Yemel Jardi 10 years ago
parent
commit
c30f656540
  1. 8
      lib/networks.js

8
lib/networks.js

@ -1,6 +1,8 @@
'use strict'; 'use strict';
var _ = require('lodash'); var _ = require('lodash');
var BufferUtil = require('./util/buffer');
/** /**
* A network is merely a map containing values that correspond to version * A network is merely a map containing values that correspond to version
* numbers for each bitcoin network. Currently only supporting "livenet" * numbers for each bitcoin network. Currently only supporting "livenet"
@ -9,8 +11,6 @@ var _ = require('lodash');
*/ */
function Network() {} function Network() {}
var hex = function(hex) { return new Buffer(hex, 'hex'); };
/** /**
* @instance * @instance
* @member Network#livenet * @member Network#livenet
@ -24,7 +24,7 @@ _.extend(livenet, {
scripthash: 0x05, scripthash: 0x05,
xpubkey: 0x0488b21e, xpubkey: 0x0488b21e,
xprivkey: 0x0488ade4, xprivkey: 0x0488ade4,
networkMagic: hex('f9beb4d9'), networkMagic: BufferUtil.integerAsBuffer(0xf9beb4d9),
port: 8333, port: 8333,
dnsSeeds: [ dnsSeeds: [
'seed.bitcoin.sipa.be', 'seed.bitcoin.sipa.be',
@ -49,7 +49,7 @@ _.extend(testnet, {
scripthash: 0xc4, scripthash: 0xc4,
xpubkey: 0x043587cf, xpubkey: 0x043587cf,
xprivkey: 0x04358394, xprivkey: 0x04358394,
networkMagic: hex('0b110907'), networkMagic: BufferUtil.integerAsBuffer(0x0b110907),
port: 18333, port: 18333,
dnsSeeds: [ dnsSeeds: [
'testnet-seed.bitcoin.petertodd.org', 'testnet-seed.bitcoin.petertodd.org',

Loading…
Cancel
Save