mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-19 20:25:51 +01:00
Merge pull request #2385 from cfromknecht/peer-write-buffer
peer: write buffer pool
This commit is contained in:
12
server.go
12
server.go
@@ -165,6 +165,8 @@ type server struct {
|
||||
|
||||
sigPool *lnwallet.SigPool
|
||||
|
||||
writeBufferPool *lnpeer.WriteBufferPool
|
||||
|
||||
// globalFeatures feature vector which affects HTLCs and thus are also
|
||||
// advertised to other nodes.
|
||||
globalFeatures *lnwire.FeatureVector
|
||||
@@ -260,11 +262,15 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, cc *chainControl,
|
||||
sharedSecretPath := filepath.Join(graphDir, "sphinxreplay.db")
|
||||
replayLog := htlcswitch.NewDecayedLog(sharedSecretPath, cc.chainNotifier)
|
||||
sphinxRouter := sphinx.NewRouter(privKey, activeNetParams.Params, replayLog)
|
||||
writeBufferPool := lnpeer.NewWriteBufferPool(
|
||||
lnpeer.DefaultGCInterval, lnpeer.DefaultExpiryInterval,
|
||||
)
|
||||
|
||||
s := &server{
|
||||
chanDB: chanDB,
|
||||
cc: cc,
|
||||
sigPool: lnwallet.NewSigPool(runtime.NumCPU()*2, cc.signer),
|
||||
chanDB: chanDB,
|
||||
cc: cc,
|
||||
sigPool: lnwallet.NewSigPool(runtime.NumCPU()*2, cc.signer),
|
||||
writeBufferPool: writeBufferPool,
|
||||
|
||||
invoices: invoices.NewRegistry(chanDB, activeNetParams.Params),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user