Skip to content

Commit

Permalink
Merge branch 'main' of github.com:dskvr/nostr-relay-inspector into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Dec 18, 2022
2 parents a236627 + 3e12c7b commit 092a7ff
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Inspector.prototype.get_info = async function(){
this.result.info = await this.getInfo()

if(this.result?.info && this.opts.passiveNipTests)
this.result.nips[11] = true
this.info?.supported_nips.forEach(nip => this.result.nips[nip] = true)

if(this.result?.info?.pubkey)
this.result.identities = Object.assign(this.result.identities, { serverAdmin: this.result.info.pubkey })
Expand Down Expand Up @@ -268,8 +268,6 @@ Inspector.prototype.handle_event = function(subid, event) {
}, config.millis.clearTimeoutBuffer)
}

console.log('AHHH', type, method, this.relay.url)

this.result.count[type]++
}

Expand All @@ -279,7 +277,7 @@ Inspector.prototype.handle_event = function(subid, event) {
Event Callbacks
*/

Inspector.prototype.on_open = function(e) {
Inspector.prototype.on_open = async function(e) {
if(this.opts.debug) console.log(this.relay.url, "on_open")

//debug.info(url, "OPEN")
Expand All @@ -293,20 +291,20 @@ Inspector.prototype.on_open = function(e) {

this.result.check.connect = true

if(this.opts.getInfo)
await this.get_info()

if(this.opts.getIdentities)
await this.get_identities()

if(this.opts.checkRead)
this.check_read()

if(this.opts.checkWrite)
this.check_write()

if(this.opts.checkLatency)
this.check_latency()

if(this.opts.getInfo)
this.get_info()

if(this.opts.getIdentities)
this.get_identities()
this.check_latency()

this.try_complete()
this.cbcall("open", e, this.result)
Expand Down

0 comments on commit 092a7ff

Please sign in to comment.