bip150: display bip150 address to user.
This commit is contained in:
parent
134bece292
commit
51975003c2
@ -162,17 +162,17 @@ BIP150.prototype.propose = function propose(payload) {
|
||||
|
||||
BIP150.prototype.toChallenge = function toChallenge(writer) {
|
||||
var p = new bcoin.writer(writer);
|
||||
var msg;
|
||||
var hash;
|
||||
|
||||
assert(this.outbound, 'Cannot challenge an inbound connection.');
|
||||
assert(this.peerIdentity, 'Cannot challenge without a peer identity.');
|
||||
|
||||
msg = this.hash(this.output.sid, 'i', this.peerIdentity);
|
||||
hash = this.hash(this.output.sid, 'i', this.peerIdentity);
|
||||
|
||||
assert(!this.challengeSent, 'Cannot initiate challenge twice.');
|
||||
this.challengeSent = true;
|
||||
|
||||
p.writeBytes(msg);
|
||||
p.writeBytes(hash);
|
||||
|
||||
if (!writer)
|
||||
p = p.render();
|
||||
|
||||
@ -350,7 +350,8 @@ Peer.prototype._onHandshake = function _onHandshake() {
|
||||
assert(this.bip150.completed);
|
||||
if (this.bip150.auth) {
|
||||
this.logger.info('BIP150 handshake complete (%s).', this.hostname);
|
||||
this.logger.info('Peer is authed (%s).', this.hostname);
|
||||
this.logger.info('Peer is authed (%s): %s.',
|
||||
this.hostname, this.bip150.getAddress());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user