Skip to content

Commit

Permalink
Release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
slezica committed Jan 29, 2021
1 parent 8107c44 commit cef49ef
Show file tree
Hide file tree
Showing 209 changed files with 70,107 additions and 876 deletions.
280 changes: 0 additions & 280 deletions blockchain_scanner.go

This file was deleted.

51 changes: 51 additions & 0 deletions cmd/survey/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package main

import (
"fmt"

"github.com/muun/recovery/electrum"
"github.com/muun/recovery/scanner"
)

var failedToConnect []string
var withBatching []string
var withoutBatching []string

func main() {
client := electrum.NewClient()

for _, server := range scanner.PublicElectrumServers {
surveyServer(client, server)
}

fmt.Println("// With batch support:")
for _, server := range withBatching {
fmt.Printf("\"%s\"\n", server)
}

fmt.Println("// Without batch support:")
for _, server := range withoutBatching {
fmt.Printf("\"%s\"\n", server)
}

fmt.Println("// Unclassified:")
for _, server := range failedToConnect {
fmt.Printf("\"%s\"\n", server)
}
}

func surveyServer(client *electrum.Client, server string) {
fmt.Println("Surveyng", server)
err := client.Connect(server)

if err != nil {
failedToConnect = append(failedToConnect, server)
return
}

if client.SupportsBatching() {
withBatching = append(withBatching, server)
} else {
withoutBatching = append(withoutBatching, server)
}
}
Loading

0 comments on commit cef49ef

Please sign in to comment.