Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from square/alok/server_version
Browse files Browse the repository at this point in the history
Don't hardcode version in blockchain.go
  • Loading branch information
mbyczkowski committed Oct 15, 2018
2 parents 9a51414 + 6ba3a97 commit 690db13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/electrum/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ func (n *Node) ServerFeatures() (*Feature, error) {
// exist before v1.2
//
// http://docs.electrum.org/en/latest/protocol.html#server-version
func (n *Node) ServerVersion() error {
func (n *Node) ServerVersion(ver string) error {
var ignored []string
return n.request("server.version", []interface{}{"beancounter", "1.2"}, &ignored)
return n.request("server.version", []interface{}{"beancounter", ver}, &ignored)
}

// BlockchainAddressGetHistory returns the history of an address.
Expand Down
2 changes: 1 addition & 1 deletion backend/electrum_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (eb *ElectrumBackend) addNode(addr, port string, network utils.Network) err
}

// Negotiate version
err = node.ServerVersion()
err = node.ServerVersion("1.2")
if err != nil {
eb.nodeMu.Lock()
eb.blacklistedNodes[ident] = struct{}{}
Expand Down

0 comments on commit 690db13

Please sign in to comment.