• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 12583319996
58%
master: 67%

Build:
Build:
LAST BUILD BRANCH: refactor-payment-part-6
DEFAULT BRANCH: master
Ran 02 Jan 2025 01:59PM UTC
Jobs 1
Files 852
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Jan 2025 01:38PM UTC coverage: 57.522% (-1.1%) from 58.598%
12583319996

Pull #9361

github

starius
fn/ContextGuard: use context.AfterFunc to wait

Simplifies context cancellation handling by using context.AfterFunc instead of a
goroutine to wait for context cancellation. This approach avoids the overhead of
a goroutine during the waiting period.

For ctxQuitUnsafe, since g.quit is closed only in the Quit method (which also
cancels all associated contexts), waiting on context cancellation ensures the
same behavior without unnecessary dependency on g.quit.

Added a test to ensure that the Create method does not launch any goroutines.
Pull Request #9361: fn: optimize context guard

102587 of 178344 relevant lines covered (57.52%)

24734.33 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
85.56
-0.36% watchtower/wtclient/queue.go
1
97.83
-2.17% chanbackup/recover.go
1
73.33
-6.67% labels/labels.go
2
82.86
-2.86% chanbackup/backupfile.go
2
93.87
-0.94% chanfitness/chanevent.go
2
96.51
-2.33% queue/gc_queue.go
2
81.48
-0.67% funding/batch.go
2
73.53
-0.23% channeldb/payments.go
2
65.63
-2.08% lnwallet/sigpool.go
2
96.0
-2.0% watchtower/wtclient/candidate_iterator.go
2
93.55
0.0% htlcswitch/mailbox.go
2
80.0
-4.0% record/mpp.go
2
77.18
-1.34% channeldb/waitingproof.go
2
58.33
-8.33% htlcswitch/failure_detail.go
2
77.56
-0.3% htlcswitch/circuit_map.go
2
73.98
-1.63% htlcswitch/circuit.go
2
85.71
-14.29% lnutils/log.go
2
80.15
-1.47% channeldb/meta.go
2
84.32
-0.13% channeldb/invoices.go
2
77.78
-1.71% channeldb/witness_cache.go
2
86.26
-0.95% invoices/invoice_expiry_watcher.go
2
81.48
-3.7% chanacceptor/chainedacceptor.go
2
66.67
-1.48% brontide/listener.go
2
78.92
-1.08% watchtower/lookout/justice_descriptor.go
2
50.0
-50.0% batch/interface.go
3
92.34
-1.15% graph/db/graph_cache.go
3
0.0
-15.79% lncfg/config.go
3
64.0
-12.0% lnwire/update_fail_htlc.go
3
62.5
-37.5% watchtower/wtdb/session_id.go
3
50.0
-50.0% lncfg/monitoring_off.go
3
45.45
-27.27% lncfg/rpcmiddleware.go
3
0.0
-42.86% monitoring/monitoring_off.go
3
84.21
-15.79% graph/errors.go
3
74.6
-4.76% channeldb/peers.go
3
75.15
-0.61% channeldb/forwarding_package.go
3
87.18
-7.69% lnwire/short_channel_id.go
3
63.46
-5.77% lnwire/update_fulfill_htlc.go
3
70.83
-12.5% lnwire/stfu.go
3
73.91
-4.35% lnwire/update_add_htlc.go
3
63.33
-10.0% lnwire/update_fail_malformed_htlc.go
3
13.18
0.0% watchtower/wtdb/migration8/range_index.go
3
0.0
-100.0% chainreg/chainparams.go
3
83.78
-8.11% lnwallet/chainfee/rates.go
3
31.25
-9.38% intercepted_forward.go
3
76.36
-5.45% lnwire/revoke_and_ack.go
3
86.15
-4.62% watchtower/wtdb/client_session.go
3
79.63
-1.85% channeldb/reports.go
3
75.0
-25.0% routing/nodepair.go
3
88.89
-11.11% keychain/ecdh.go
3
84.75
-5.08% lnwire/commit_sig.go
4
83.15
-0.89% chanbackup/single.go
4
21.43
-28.57% build/deployment.go
4
86.32
-4.21% subscribe/subscribe.go
4
0.0
-66.67% lncfg/interface.go
4
0.0
-40.0% lncfg/htlcswitch.go
4
72.34
-8.51% graph/db/models/node.go
4
90.84
-0.96% internal/musig2v040/sign.go
4
97.48
-2.52% fn/v2/list.go
4
34.69
-8.16% htlcswitch/hodl/flags.go
4
77.27
-1.65% watchtower/wtserver/server.go
4
42.86
-57.14% keychain/derivation.go
4
29.03
-12.9% lncfg/cluster.go
4
61.9
-19.05% netann/node_signer.go
4
0.0
-40.0% lncfg/caches.go
4
0.0
-40.0% lncfg/chain.go
4
95.56
-2.96% sweep/fee_function.go
4
51.28
-5.13% invoices/resolution_result.go
4
88.01
-1.26% invoices/update.go
4
88.15
-1.48% aezeed/cipherseed.go
5
83.87
-4.03% lnwallet/chanfunding/canned_assembler.go
5
0.0
-100.0% lnutils/errors.go
5
68.38
-1.29% autopilot/graph.go
5
89.1
-3.21% channeldb/forwarding_log.go
5
89.78
-2.22% routing/chainview/neutrino.go
5
72.96
-0.61% watchtower/wtclient/client.go
5
79.7
-1.49% macaroons/store.go
5
76.19
-7.94% chainntnfs/best_block_view.go
5
65.58
-1.62% routing/localchans/manager.go
5
75.97
-1.14% channeldb/payment_control.go
5
85.45
-9.09% htlcswitch/failure.go
5
83.05
-8.47% routing/payment_session_source.go
6
50.0
-21.43% lncfg/wtclient.go
6
82.97
-1.89% netann/chan_status_manager.go
6
0.0
-37.5% zpay32/hophint.go
6
73.92
-0.79% contractcourt/nursery_store.go
6
13.21
-11.32% build/config_dev.go
6
0.0
-16.22% lncfg/pprof.go
6
78.99
-4.35% input/size.go
6
68.0
-12.0% record/amp.go
6
0.0
-35.29% lncfg/routing.go
6
81.82
-4.55% peer/ping_manager.go
6
70.47
-0.68% contractcourt/utxonursery.go
6
57.14
-42.86% lntypes/txsize.go
6
87.59
-2.26% channeldb/mp_payment.go
6
87.57
-3.24% chainntnfs/mempool.go
6
0.0
-27.27% build/log_shutdown.go
6
0.0
-100.0% lncfg/protocol_legacy_on.go
7
86.85
-2.42% routing/blinding.go
7
92.09
-5.04% watchtower/wtpolicy/policy.go
7
80.3
-1.72% routing/missioncontrol_store.go
7
29.17
-29.17% lncfg/sweeper.go
7
0.0
-58.33% lncfg/invoices.go
7
0.0
-46.67% lncfg/remotesigner.go
7
73.42
-1.01% chainntnfs/btcdnotify/btcd.go
7
73.33
-4.24% macaroons/service.go
8
89.59
-0.94% routing/pathfind.go
8
87.48
-1.57% routing/result_interpretation.go
8
66.67
-22.22% channeldb/options.go
8
94.07
-3.16% lnwire/message.go
8
79.49
-20.51% graph/stats.go
8
89.52
-3.23% lnwallet/chanfunding/coin_select.go
8
89.37
-1.93% discovery/sync_manager.go
8
88.46
-7.69% watchtower/blob/type.go
9
0.0
-81.82% lncfg/gossip.go
9
14.63
-21.95% build/log.go
10
41.67
-41.67% macaroons/auth.go
10
0.0
-58.82% lnwallet/rpcwallet/healthcheck.go
10
66.56
-3.28% chainntnfs/interface.go
10
68.47
-4.93% sweep/txgenerator.go
11
82.23
-1.59% chainntnfs/neutrinonotify/neutrino.go
11
51.75
-4.28% funding/commitment_type_negotiation.go
11
0.0
-100.0% sweeper_wallet.go
11
81.21
-6.67% routing/probability_apriori.go
11
77.37
-4.53% routing/payment_session.go
11
77.78
-11.11% discovery/ban.go
12
0.0
-15.19% autopilot/combinedattach.go
12
73.42
-1.64% lnwallet/chancloser/chancloser.go
12
44.83
-41.38% graph/db/options.go
13
64.86
-35.14% contractcourt/htlc_lease_resolver.go
13
0.0
-50.0% cmd/lnd/main.go
13
69.57
-11.3% zpay32/invoice.go
13
80.78
-4.63% chanfitness/chaneventstore.go
13
40.0
-13.0% lnwallet/errors.go
13
87.24
-6.63% routing/control_tower.go
13
53.17
-10.32% input/signdescriptor.go
13
72.16
-0.71% watchtower/wtdb/client_db.go
15
79.38
-4.69% internal/musig2v040/context.go
15
67.39
-32.61% watchtower/wtclient/stats.go
15
80.88
-7.35% sweep/walletsweep.go
15
77.57
-14.02% witness_beacon.go
15
57.45
-31.91% lnwire/custom.go
16
64.62
-8.21% watchtower/lookout/lookout.go
16
74.26
-15.84% invoices/modification_interceptor.go
16
0.0
-44.44% lncfg/healthcheck.go
16
36.11
-44.44% build/config.go
17
0.0
-54.84% htlcswitch/linkfailure.go
17
76.3
-12.59% contractcourt/anchor_resolver.go
17
56.2
-4.14% tls_manager.go
18
54.55
-6.29% routing/probability_bimodal.go
19
79.63
-3.87% contractcourt/taproot_briefcase.go
19
32.08
-35.85% keychain/signer.go
19
0.0
-61.29% htlcswitch/hodl/config_dev.go
20
0.0
-86.96% routing/graph.go
20
0.0
-90.91% build/handlers.go
21
80.81
-12.21% chainio/dispatcher.go
21
72.83
-22.83% input/taproot.go
21
61.21
-3.74% watchtower/wtclient/manager.go
21
74.22
-9.33% lncfg/address.go
22
86.98
-10.23% sweep/tx_input_set.go
22
74.25
-8.21% invoices/invoices.go
22
0.0
-62.86% chainreg/taproot_check.go
23
88.07
-3.16% routing/payment_lifecycle.go
24
81.3
-3.53% lnwire/onion_error.go
24
21.74
-52.17% build/version.go
25
62.99
-19.69% contractcourt/htlc_outgoing_contest_resolver.go
26
45.8
-19.85% lnwallet/interface.go
26
86.21
-2.19% chainntnfs/txnotifier.go
27
64.94
-3.59% lnwire/lnwire.go
27
83.89
-4.73% routing/blindedpath/blinded_path.go
28
54.93
-39.44% contractcourt/breach_resolver.go
28
39.29
-33.33% htlcswitch/hop/error_encryptor.go
29
0.0
-13.12% autopilot/manager.go
31
0.0
-81.58% graph/graphsession/graph_session.go
31
12.5
-64.58% watchtower/conf.go
32
72.11
-10.88% chanacceptor/rpcacceptor.go
32
0.0
-94.12% netann/node_announcement.go
34
76.44
-19.54% routing/missioncontrol_state.go
35
45.99
-25.55% brontide/conn.go
35
5.45
-63.64% build/logrotator.go
36
78.66
-3.66% channeldb/db.go
37
73.08
-7.12% lnwallet/reservation.go
37
30.49
-45.12% channelnotifier/channelnotifier.go
37
14.46
-44.58% lnwallet/btcwallet/blockchain.go
37
0.0
-90.24% peernotifier/peernotifier.go
38
54.02
-21.84% input/musig2_session_manager.go
39
82.87
-4.95% lnwallet/commitment.go
40
81.62
-4.38% discovery/syncer.go
41
63.54
-22.65% feature/manager.go
42
54.81
-31.11% macaroons/constraints.go
43
71.97
-9.64% contractcourt/htlc_incoming_contest_resolver.go
43
68.21
-15.36% keychain/btcwallet.go
45
59.0
-18.83% htlcswitch/decayedlog.go
46
66.67
-15.03% lnwallet/chanfunding/psbt_assembler.go
48
33.4
-9.43% lnwallet/chainfee/estimator.go
48
72.86
-13.71% lnwallet/chanfunding/wallet_assembler.go
49
66.98
-15.41% contractcourt/commit_sweep_resolver.go
49
0.0
-56.32% build/handler_sets.go
50
70.65
-10.87% htlcswitch/interceptable_switch.go
51
84.23
-2.77% input/script_utils.go
52
80.52
-4.31% invoices/invoiceregistry.go
52
0.0
-89.66% htlcswitch/sequencer.go
53
75.5
-1.68% graph/db/graph.go
55
58.04
-12.28% walletunlocker/service.go
57
72.05
-8.3% chainntnfs/bitcoindnotify/bitcoind.go
58
40.71
-41.43% build/sub_logger.go
59
6.58
-77.63% peer/musig_chan_closer.go
60
79.68
-11.83% contractcourt/htlc_success_resolver.go
63
61.09
-20.26% lnwallet/btcwallet/signer.go
70
0.0
-35.0% pilot.go
76
72.17
-15.11% routing/missioncontrol.go
84
68.27
-20.19% aliasmgr/aliasmgr.go
84
0.0
-67.74% signal/signal.go
85
0.0
-62.04% watchtower/standalone.go
87
38.25
-30.53% input/musig2.go
92
0.0
-88.46% channel_notifier.go
101
69.36
-9.27% graph/builder.go
108
4.44
-20.85% lncfg/db.go
112
6.45
-90.32% log.go
112
73.49
-4.5% channeldb/channel.go
133
72.74
-12.42% routing/router.go
133
50.59
-31.59% lnwallet/btcwallet/psbt.go
137
71.65
-17.65% contractcourt/htlc_timeout_resolver.go
147
44.81
-47.73% input/input.go
150
0.0
-81.52% discovery/chan_series.go
159
69.35
-11.86% contractcourt/breach_arbitrator.go
166
82.09
-2.59% lnwallet/channel.go
173
0.0
-74.25% chanrestore.go
177
71.26
-7.91% discovery/gossiper.go
187
73.97
-18.79% sweep/fee_bumper.go
189
38.01
-40.82% htlcswitch/hop/iterator.go
192
67.19
-11.17% lnwallet/wallet.go
199
74.05
-9.26% contractcourt/channel_arbitrator.go
207
68.26
-5.81% funding/manager.go
207
0.0
-42.68% chainreg/chainregistry.go
212
50.92
-20.52% contractcourt/briefcase.go
213
71.62
-11.13% htlcswitch/switch.go
214
60.4
-18.46% lnwallet/btcwallet/btcwallet.go
215
31.51
-47.05% input/witnessgen.go
219
5.59
-72.04% rpcperms/middleware_handler.go
238
57.83
-24.97% contractcourt/chain_watcher.go
251
0.0
-94.36% subrpcserver_config.go
286
68.15
-10.27% htlcswitch/link.go
332
36.04
-44.15% contractcourt/chain_arbitrator.go
431
0.0
-58.32% lnd.go
463
20.7
-33.29% config.go
499
42.9
-49.21% sweep/sweeper.go
517
0.0
-82.59% rpcperms/interceptor.go
630
0.0
-67.31% config_builder.go
661
0.0
-72.48% lnwallet/rpcwallet/rpcwallet.go
960
40.04
-36.23% peer/brontide.go
2247
0.28
-63.6% server.go
4055
6.58
-63.87% rpcserver.go
Jobs
ID Job ID Ran Files Coverage
1 unit - 12583319996.1 02 Jan 2025 01:59PM UTC 852
57.52
GitHub Action Run
Source Files on build 12583319996
  • Tree
  • List 852
  • Changed 207
  • Source Changed 0
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #9361
  • PR Base - master (#12432520655)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc