fix port. packets.
This commit is contained in:
parent
c1aeb5c07f
commit
89a8329a76
@ -56,6 +56,7 @@ function Peer(pool, options) {
|
||||
assert(this.port != null);
|
||||
} else if (options.seed) {
|
||||
options.seed = utils.parseHost(options.seed);
|
||||
options.seed.port = options.seed.port || network.port;
|
||||
this.socket = this.createSocket(options.seed.port, options.seed.host);
|
||||
}
|
||||
|
||||
|
||||
@ -1836,7 +1836,7 @@ Pool.prototype.addSeed = function addSeed(seed) {
|
||||
|
||||
this.seeds.push({
|
||||
host: seed.host,
|
||||
port: seed.port || bcoin.protocol.network.port
|
||||
port: seed.port || network.port
|
||||
});
|
||||
|
||||
this.hosts[seed.host] = true;
|
||||
|
||||
@ -208,14 +208,14 @@ Framer.version = function version(options, writer) {
|
||||
if (options.local.services == null)
|
||||
options.local.services = constants.bcoinServices;
|
||||
|
||||
p.writeU32(constants.version);
|
||||
p.write32(constants.version);
|
||||
p.writeU64(constants.bcoinServices);
|
||||
p.write64(utils.now());
|
||||
Framer.address(options.remote, false, p);
|
||||
Framer.address(options.local, false, p);
|
||||
p.writeU64(utils.nonce());
|
||||
p.writeVarString(options.agent);
|
||||
p.writeU32(options.height || 0);
|
||||
p.write32(options.height || 0);
|
||||
p.writeU8(options.relay ? 1 : 0);
|
||||
|
||||
if (!writer)
|
||||
|
||||
@ -186,10 +186,10 @@ Parser.parseVersion = function parseVersion(p) {
|
||||
ts = p.read64();
|
||||
|
||||
// Our address (recv)
|
||||
recv = Parser.parseAddress(p);
|
||||
recv = Parser.parseAddress(p, false);
|
||||
|
||||
// Their Address (from)
|
||||
from = Parser.parseAddress(p);
|
||||
from = Parser.parseAddress(p, false);
|
||||
|
||||
// Nonce, very dramatic
|
||||
nonce = p.readU64();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user