chain: remove extraneous rpcclient.Disconnect calls from BitcoindConn
These are not needed since they have no effect when the RPC client is making HTTP POST requests.
This commit is contained in:
parent
f02166e5de
commit
6c4dab5f7c
1 changed files with 0 additions and 4 deletions
|
@ -82,7 +82,6 @@ func NewBitcoindConn(chainParams *chaincfg.Params,
|
|||
zmqBlockHost, []string{"rawblock"}, zmqPollInterval,
|
||||
)
|
||||
if err != nil {
|
||||
client.Disconnect()
|
||||
return nil, fmt.Errorf("unable to subscribe for zmq block "+
|
||||
"events: %v", err)
|
||||
}
|
||||
|
@ -91,7 +90,6 @@ func NewBitcoindConn(chainParams *chaincfg.Params,
|
|||
zmqTxHost, []string{"rawtx"}, zmqPollInterval,
|
||||
)
|
||||
if err != nil {
|
||||
client.Disconnect()
|
||||
zmqBlockConn.Close()
|
||||
return nil, fmt.Errorf("unable to subscribe for zmq tx "+
|
||||
"events: %v", err)
|
||||
|
@ -122,11 +120,9 @@ func (c *BitcoindConn) Start() error {
|
|||
// Verify that the node is running on the expected network.
|
||||
net, err := c.getCurrentNet()
|
||||
if err != nil {
|
||||
c.client.Disconnect()
|
||||
return err
|
||||
}
|
||||
if net != c.chainParams.Net {
|
||||
c.client.Disconnect()
|
||||
return fmt.Errorf("expected network %v, got %v",
|
||||
c.chainParams.Net, net)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue