|
|
@ -1,23 +1,21 @@ |
|
|
|
var imports = require('soop').imports(); |
|
|
|
|
|
|
|
var log = imports.log || require('../util/log'); |
|
|
|
var log = require('../util/log'); |
|
|
|
|
|
|
|
var MAX_RECEIVE_BUFFER = 10000000; |
|
|
|
var PROTOCOL_VERSION = 70000; |
|
|
|
|
|
|
|
var Put = imports.Put || require('bufferput'); |
|
|
|
var Buffers = imports.Buffers || require('buffers'); |
|
|
|
var Put = require('bufferput'); |
|
|
|
var Buffers = require('buffers'); |
|
|
|
require('../patches/Buffers.monkey').patch(Buffers); |
|
|
|
|
|
|
|
var bitcoreDefaults = imports.config || require('../config'); |
|
|
|
var networks = imports.networks || require('../networks'); |
|
|
|
var Block = imports.Block || require('./Block'); |
|
|
|
var Transaction = imports.Transaction || require('./Transaction'); |
|
|
|
var util = imports.util || require('../util'); |
|
|
|
var Parser = imports.Parser || require('../util/BinaryParser'); |
|
|
|
var buffertools = imports.buffertools || require('buffertools'); |
|
|
|
var doubleSha256 = imports.doubleSha256 || util.twoSha256; |
|
|
|
var SecureRandom = imports.SecureRandom || require('./SecureRandom'); |
|
|
|
var bitcoreDefaults = require('../config'); |
|
|
|
var networks = require('../networks'); |
|
|
|
var Block = require('./Block'); |
|
|
|
var Transaction = require('./Transaction'); |
|
|
|
var util = require('../util'); |
|
|
|
var Parser = require('../util/BinaryParser'); |
|
|
|
var buffertools = require('buffertools'); |
|
|
|
var doubleSha256 = util.twoSha256; |
|
|
|
var SecureRandom = require('./SecureRandom'); |
|
|
|
var nonce = SecureRandom.getPseudoRandomBuffer(8); |
|
|
|
|
|
|
|
var BIP0031_VERSION = 60000; |
|
|
@ -33,7 +31,7 @@ function Connection(socket, peer, opts) { |
|
|
|
|
|
|
|
// check for socks5 proxy options and construct a proxied socket
|
|
|
|
if (this.config.proxy) { |
|
|
|
var Socks5Client = imports.Socks5Client || require('socks5-client'); |
|
|
|
var Socks5Client = require('socks5-client'); |
|
|
|
this.socket = new Socks5Client(this.config.proxy.host, this.config.proxy.port); |
|
|
|
} |
|
|
|
|
|
|
|