f513fca6a7
1. Fixed a bug, which reads certs even TLS is disabled 2. Persists Stratum TCP connection with auto-reconnect. (retry backoff increases from 1s to 60s maximum) 3. Stratum update jobs on previous notifications are canceled when a new notification arrives. Usually, the jobs are so short and completed immediately. However, if the Stratum connection is broken, this prevents the bridge from accumulating stale jobs.
20 lines
381 B
Go
20 lines
381 B
Go
package main
|
|
|
|
import (
|
|
"github.com/lbryio/lbcd/wire"
|
|
"github.com/lbryio/lbcutil"
|
|
)
|
|
|
|
type eventBlockConected struct {
|
|
height int32
|
|
header *wire.BlockHeader
|
|
txns []*lbcutil.Tx
|
|
}
|
|
|
|
type adapter struct {
|
|
*bridge
|
|
}
|
|
|
|
func (a *adapter) onFilteredBlockConnected(height int32, header *wire.BlockHeader, txns []*lbcutil.Tx) {
|
|
a.eventCh <- &eventBlockConected{height, header, txns}
|
|
}
|