mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 18:56:30 +02:00
Merge pull request #5674 from torkelrogstad/2021-08-26-http-mux
lntest: avoid global ServeMux
This commit is contained in:
@@ -42,6 +42,10 @@ tag](https://github.com/lightningnetwork/lnd/pull/5335). A new flag
|
|||||||
test](https://github.com/lightningnetwork/lnd/pull/5348) that would cause the
|
test](https://github.com/lightningnetwork/lnd/pull/5348) that would cause the
|
||||||
test to assert the wrong balance (the miner fee wasn't accounted for).
|
test to assert the wrong balance (the miner fee wasn't accounted for).
|
||||||
|
|
||||||
|
A bug has been [fixed](https://github.com/lightningnetwork/lnd/pull/5674) in
|
||||||
|
the `lntest` package that prevented multiple test harnesses to be created from
|
||||||
|
the same process.
|
||||||
|
|
||||||
## Forwarding Optimizations
|
## Forwarding Optimizations
|
||||||
|
|
||||||
[Decoding onion blobs is now done in
|
[Decoding onion blobs is now done in
|
||||||
|
@@ -46,12 +46,14 @@ func startFeeService() *feeService {
|
|||||||
f.Fees = map[uint32]uint32{feeServiceTarget: 50000}
|
f.Fees = map[uint32]uint32{feeServiceTarget: 50000}
|
||||||
|
|
||||||
listenAddr := fmt.Sprintf(":%v", port)
|
listenAddr := fmt.Sprintf(":%v", port)
|
||||||
|
mux := http.NewServeMux()
|
||||||
|
mux.HandleFunc("/fee-estimates.json", f.handleRequest)
|
||||||
|
|
||||||
f.srv = &http.Server{
|
f.srv = &http.Server{
|
||||||
Addr: listenAddr,
|
Addr: listenAddr,
|
||||||
|
Handler: mux,
|
||||||
}
|
}
|
||||||
|
|
||||||
http.HandleFunc("/fee-estimates.json", f.handleRequest)
|
|
||||||
|
|
||||||
f.wg.Add(1)
|
f.wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer f.wg.Done()
|
defer f.wg.Done()
|
||||||
|
Reference in New Issue
Block a user