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

lightningnetwork / lnd
58%
master: 57%

Build:
Build:
LAST BUILD BRANCH: go124
DEFAULT BRANCH: master
Repo Added 09 Mar 2017 04:42AM UTC
Files 938
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

LAST BUILD ON BRANCH optimize-context-guard
branch: optimize-context-guard
CHANGE BRANCH
x
Reset
  • optimize-context-guard
  • 0-18-4-branch-rc2
  • 0-18-4-branch-rc3
  • 0-18-5-branch-rc1
  • 0-18-5-branch-rc2
  • 0-19-1-branch
  • 0-19-1-rc1-branch
  • 0-19-2-branch-rc1
  • 0-19-2-branch-rc2
  • 0-19-2-final
  • 0-19-3-branch-final
  • 0-19-3-branch-rc1
  • 0-19-3-branch-rc2
  • 0-19-99
  • 0-19-branch
  • 0-19-final
  • 0-19-rc2
  • 0.4-beta
  • 18.5-releasenotes-patch
  • 19-rc2
  • 19.0-releasenotes-update
  • 2024-05-add-outbound-remote-signer
  • 2025-05-15-getchaninfo
  • 2025-06-blinded-path-amt-zero
  • 2401-bimodal-improvements
  • 2503-neutrino-maxpeers
  • 2504-mc-migration-fix
  • 2505-loadmc
  • 2505-loadmc-fixes
  • SessionTerminateDescription
  • accessman
  • accessman-log
  • actor
  • actor-mailbox-v2
  • add-aider
  • add-copy-method
  • add-filters-fwdhistory
  • add-global-lock-walletdb
  • add-logging-semaphore
  • add-missing-invoice-settle-index
  • add-opt-to-HarnessTest-NewNode
  • add-probe-logging
  • add-state-machine-isrunning
  • addDNSField
  • add_custom_error_msg
  • all-conf-option
  • amp-htlc-invoices
  • append-channel
  • appilon/6601
  • archive-channel-backups
  • assert-channel-graph
  • assert-log-shutdown-only-with-handle
  • asyncGraphCacheLoad
  • attr-failures
  • autopilotRefactor
  • aux-bandwidth-fix-check
  • aux-feature-bits
  • aux-trff-shpr-htlcview
  • backpressure-queue
  • backwardsCompat
  • bandwidth-manager-fix
  • banning_010072025
  • bartoli-patch-1
  • benchmark-fns
  • bitcoind-29
  • bot-typo-fix-spam
  • brar-handoff
  • brontide-static-alloac
  • btcwallet-fixes
  • bugfix-createmissingedge
  • build-fix-bitcoind-19-compat
  • bump-deps
  • bump-kvdb
  • bumpUploadArtifactAction
  • bumpfee-immediate-doc-fix
  • bumpfee-return-raw-tx-hex-on-success
  • bw-compat-test-sqlite
  • cert/v1.0.0
  • cert/v1.0.1
  • cert/v1.0.2
  • chainreg-nochainbackend-stub
  • chan-type-required
  • chanGraphContext
  • chanGraphContext2
  • chanUpdateBitFields
  • check-pgp-keys-expiry
  • checkNilPolicy
  • checkUpdateStalenessBeforeRateLimit
  • choreRemoveDeadCode
  • clock/v1.0.0
  • clock/v1.0.1
  • close-addr-conf
  • closechannel-rpc
  • closechannel_docs
  • closedchannels
  • cmd-fix
  • conf-count
  • contextGuard
  • coop-close-actor
  • coverage-fixes
  • cross-compile-fix
  • ctx1
  • ctx2
  • ctx3
  • ctx4
  • ctx5
  • ctx6
  • debug-listunspent
  • debug-sending-payment-failure
  • decayed-log-migration
  • decipherCipherSeed
  • degrade-err
  • deprecate-warning-sendpayment-and-sendtoroute
  • describegraph-authproofs2
  • disable-attempt-cleanup
  • documentSphinxReplay
  • dont-forward-bit
  • dyn-bigsize-msg
  • early-offer-chan-flushing-flake
  • elle-graph
  • elle-graphCacheBase
  • elle-graphSQL8-prep
  • enhance-aux-modifier
  • ensureNewNodeAnnUpdateTime
  • estimate-feerate-allow-1
  • estimate-route-fee-docs
  • estimate-route-fee-fix
  • event-store-fix
  • exit-early-for-fwd-adds
  • exp/maps
  • export-itest-db
  • export-notifier-options
  • fetch-allll-channels
  • finalize-stfu
  • fix
  • fix-InternalKeyForAddr-for-imported-addresses
  • fix-TestChangeWalletPasswordStateless
  • fix-TestReconnectSucceed
  • fix-UpdatesInHorizon
  • fix-accessman
  • fix-arb-deadlock
  • fix-attempt-hash
  • fix-bitcond-test
  • fix-blindedpath-mc
  • fix-cached-policy
  • fix-chanid-flag
  • fix-ci-cache
  • fix-circuit-closed
  • fix-custom-msg
  • fix-debug-log
  • fix-decalylog
  • fix-dep
  • fix-fetchinput
  • fix-fwd-pkg-garbage-collection
  • fix-goroutine-leak
  • fix-gossip-ann
  • fix-gossip-syncer
  • fix-graphbuilder-flake
  • fix-htlcindex
  • fix-invoice-htlcs-order
  • fix-invoice-unit-test
  • fix-listchaintxns-lncli-inputs
  • fix-listsweep-itest
  • fix-listunspent
  • fix-logging
  • fix-logging-invoices-payments
  • fix-memory-leak
  • fix-memory-leak-cherry-pick
  • fix-next-seq-kv-sql
  • fix-nil-pointer
  • fix-nilnesserr
  • fix-no-space-left
  • fix-nodeid-logging
  • fix-notification
  • fix-notifier-itest-flake
  • fix-panic
  • fix-payment-inconsitency
  • fix-payment-send-local-chan
  • fix-peer-conn
  • fix-peer-connection
  • fix-peer-connection-2
  • fix-prefix-logger
  • fix-release
  • fix-shutdown-issue
  • fix-startup
  • fix-stuck-payment
  • fix-sweep
  • fix-sweep-itest
  • fix-sweepInput-bug
  • fix-switch-deadlock
  • fix-timeout
  • fix-typos
  • fix-unit-test
  • fix-unlock-wallet
  • fix-unnecessary-db-warnings
  • fix-unused-params
  • fix-utxonursery-encoding
  • fix/rpc-graph-cache-race
  • fixAccessManLogging
  • fixLnwireTestDataRace
  • fixLogLevelInheritance
  • fixLogLinePanic
  • fixPeerBootstrappingFlake
  • fixPolicySwop
  • fixSQLFetchChannelEdgesByID
  • fixTLVSizeFn
  • fixWatcherPanic
  • fix_vb
  • flake-doc
  • flake-fix
  • fn-goroutine-manager-cond
  • fnContext
  • fn_set_copy
  • follow-up-payment-addr-spec-update
  • formatting-list-initializations
  • freshly-locked-settle-fail
  • function-call-formatting
  • funding-timeout-error
  • fundpsbt-custom-input-lock
  • fuzzy-matching-script
  • g175UpdateMessageStructure
  • geminiStyle
  • genericBatchTxScheduler
  • getChanInfoGrpcErr
  • getInfoStarted
  • go-1-22-11
  • go-1-23
  • go-1-23-9
  • go-cc
  • go124
  • goroutines
  • gossip-block-fix
  • gossiper-async-logs
  • graph-cache/zombie-channels
  • graph-clean-up
  • graph-prep
  • graph-test-clean
  • graph1
  • graph10
  • graph12
  • graph13
  • graph14
  • graph15
  • graph16
  • graph17
  • graph18
  • graph19
  • graph2
  • graph3
  • graph5
  • graph6
  • graph7
  • graph8
  • graph9
  • graphCache
  • graphFixFlake
  • graphFixMergeIssue
  • graphFixNotificationSubs
  • graphMig1-nodes
  • graphMig2-channels
  • graphMig3-indexes
  • graphMigFlipSwitch
  • graphMigUnitTestsRapid
  • graphMigUnwrapDNSAddrs
  • graphPerf1
  • graphPerf10
  • graphPerf11
  • graphPerf2
  • graphPerf3
  • graphPerf4
  • graphPerf5
  • graphPerf6
  • graphPerf7
  • graphPerf8
  • graphPerf9
  • graphPrefixTables
  • graphRefactor
  • graphResetForCallbacks
  • graphRetry
  • graphSQL
  • graphSQL-zombie-index
  • graphSQL1-extra-opaque
  • graphSQL10-forEachSourceNode
  • graphSQL11-forEachMethods
  • graphSQL12
  • graphSQL14
  • graphSQL15-prune-log
  • graphSQL16-closed-scids
  • graphSQL17-complete-unit-tests
  • graphSQL2-hideKVDBOpts
  • graphSQL3-V1StoreInterface
  • graphSQL4-test-coverage
  • graphSQL5-unified-test-graph
  • graphSQL6-final-test-prep
  • graphSQL7-nodes-tables
  • graphSQL8-channels-schema
  • graphSQL9-chan-policies-schema
  • graphSQLFixNodesQuery
  • graphSQLMigPlugIn
  • graphSQLMigration
  • graphSQLSlices
  • graphTest
  • htlc-noop-add
  • htlcidx-to-fwdingevent
  • improve-itest
  • improve-logging-for-invoices-payments
  • inboundFeeTLV
  • increase-gossip-default
  • increase-wait-wallet-sync-timeout
  • introduce-sql-schema-payments
  • invoice-bucket-tombstone
  • invoice-bucket-tombstone-log-removal
  • invoice-migration-log-rate
  • issue-8161
  • issue-8993
  • issue-9076
  • issue-9583-missing-wt-cli-usage
  • issue-9591
  • issue-9904-9915
  • itest-bitcoind-neutrino
  • itest-flake
  • itest-flake-interceptor
  • itest-log-ts
  • itestNeutrinoPR320
  • keep-exclusive
  • kvdb-etcd-bump
  • kvdb-sqlite-incremental-vacuum
  • kvdb-update
  • kweight-selection
  • linter-update
  • lncli-no-replacement
  • lntest-feeservice-mutex
  • lnwire-dyncomms-update
  • lnwire-gossip-msg
  • logConfYamlTags
  • logConfig
  • lseed
  • macaroon-docs
  • macaroon-ip-cidr-constraint
  • make-resolution-more-efficient
  • make-space-for-build
  • manageShutdownRequestsWithStatusCodes
  • master
  • mining-block-limit-configurable
  • minmax
  • minor-refactor-link
  • miscErrorFormats
  • mission-control-path-finding
  • move-pgp-check-to-daily
  • new-co-op-close-state-machine-final
  • nodeAnnConversion
  • non-staging-rbf-coop
  • noop-add
  • offers-boltnd
  • onchain-htlc-replay-wire-records
  • onion-messaging
  • optional-migration
  • optional-ping
  • outchanids-to-queryroutes
  • patch-1
  • patch-2
  • payment-bandwidth-funding-blob
  • payment-lifecycle-small-fix
  • payments-metrics
  • peer-async-disconnect
  • peerBootstrapItest
  • ping-pong-pro
  • pong-relax
  • preparework-payments
  • preventCurrentNodeAnnMutation
  • preventSubsequentPayment
  • prod-taproot-chans
  • protofsm-conf-mapper
  • protofsm-full-block-conf
  • queue/v1.0.0
  • queue/v1.0.1
  • queue/v1.0.2
  • queue/v1.0.3
  • queue/v1.0.4
  • rapid-fuzz-htlc-blobs
  • rate-limit-peer
  • rbIncomingFollowup
  • rbf-close-err
  • rbf-coop-fsm
  • rbf-iteration-loop-flake
  • rbf-staging
  • rbf-staging-integration
  • rbf-staging-prep
  • rbf-staging-state-machine
  • rbf-taproot-downgrade
  • reapply-8644
  • reapply-8644-on-9260
  • rebase-fix
  • refactor-makedir
  • refactor-msg-code
  • refactor-payments-code
  • refactor-payments-code-02
  • refactor-payments-code-03
  • refactor-payments-code-04
  • refactor-payments-code-05
  • reject-payment-without-invoice
  • relaxFeatureBitCheck
  • release-doc-fix
  • remote-signing-imported-tapscript
  • removal-of-edge-atomic
  • remove-2x-value
  • remove-caching
  • remove-deprecated-endpoints-sendpayment-and-sendtoroute
  • remove-old-keys
  • remove-positiveblue-pgp-key
  • remove-replace
  • remove-used-proto-message
  • removeChanClean
  • removeChanGraphCacheMu
  • removeModReplaces
  • reorder-buckets-check
  • reorg-notif-itest3
  • require-payment-secret
  • res-opt
  • resend-annsig
  • restore-node-announcement
  • review-checklist
  • round-up
  • rpc-find-base-alias
  • rpcInterceptorMD
  • show-all-inputs
  • silent-payments
  • simplifyForwardingLogQuery
  • size-msg-test-msg
  • skip-blockbeat
  • skip-migration-rename
  • skip-native-sql-migration-doc-update
  • skip-vendor-and-source-packaging-cross-builds
  • slogProtofsm
  • sm-isrunning-unit-test
  • small-bug-fix
  • small-neutrino-fix
  • sphinx-relays-doc
  • splice-nonces
  • sql-invoice-migration
  • sqlGraphUpdates
  • sqldb-migration-base-version
  • sqldbHelpers
  • strict-forwarding
  • strictTypeForChanFeatures
  • strip_dwarf_0507
  • stuck-payments-fix
  • submitpackage
  • supportDNSHostnameInNodeAnnouncement
  • sweep-under-budget
  • sweeper-fix
  • switch-attempt-store
  • switchrpc
  • switchrpc-pure
  • sync-ping-send
  • taproot-final-scripts
  • taproot-rbf
  • test-context-guard-optimization2
  • test-num-block-fund
  • testingbtcwalletchange
  • testnet4
  • tests/multimutex
  • ticker-queue-modules
  • ticker/v1.0.0
  • tlv/v1.0.0
  • tlvSizeBigSize
  • tor-update
  • unified-gossip-limiter
  • up-deps
  • update-19-3-release-notes
  • update-action
  • update-ffranr-signing-key
  • update-golang-version
  • update-goveralls
  • update-lightning-onion
  • updateElleKey
  • updateTLVDep
  • update_fn_01072025
  • use-btcwallet-interface
  • use-sqldb-1.0.7
  • use-sqldb-v1.0.8
  • useUpdatedContextGuard
  • v0.10.0-beta
  • v0.10.0-beta.rc2
  • v0.10.0-beta.rc5
  • v0.10.0-beta.rc6
  • v0.10.1-beta
  • v0.10.1-beta-branch
  • v0.10.1-beta-rc1-branch
  • v0.10.1-beta-rc3-branch
  • v0.10.1-beta.rc1
  • v0.10.1-beta.rc2
  • v0.10.1-beta.rc3
  • v0.10.2-beta
  • v0.10.2-beta-branch
  • v0.10.2-beta-rc1-branch
  • v0.10.2-beta-rc2-branch
  • v0.10.2-beta-rc3-branch
  • v0.10.2-beta-rc4-branch
  • v0.10.2-beta.rc1
  • v0.10.2-beta.rc2
  • v0.10.2-beta.rc3
  • v0.10.2-beta.rc4
  • v0.10.3-beta-branch
  • v0.10.3-beta-rc1-branch
  • v0.10.3-beta.rc1
  • v0.10.4-beta
  • v0.10.4-beta-branch
  • v0.2-alpha
  • v0.2.1-alpha
  • v0.3-alpha
  • v0.4-beta
  • v0.4.1-beta
  • v0.5-beta
  • v0.5-beta-rc1
  • v0.5-beta-rc2
  • v0.5.1-beta
  • v0.5.1-beta-rc2
  • v0.5.1-beta-rc3
  • v0.5.1-beta-rc4
  • v0.5.2-beta
  • v0.5.2-beta-rc2
  • v0.5.2-beta-rc3
  • v0.5.2-beta-rc4
  • v0.5.2-beta-rc5
  • v0.5.2-beta-rc6
  • v0.5.2-beta-rc7
  • v0.6-beta-rc1
  • v0.6-beta-rc2
  • v0.6-beta-rc4
  • v0.6.0-beta
  • v0.6.1-beta
  • v0.6.1-beta-rc1
  • v0.6.1-beta-rc2
  • v0.7.0-beta
  • v0.7.0-beta-rc1
  • v0.7.0-beta-rc2
  • v0.7.0-beta-rc3
  • v0.7.1-beta
  • v0.7.1-beta-rc1
  • v0.7.1-beta-rc2
  • v0.8.0-beta
  • v0.8.0-beta-rc1
  • v0.8.0-beta-rc2
  • v0.8.0-beta-rc3
  • v0.8.1-beta
  • v0.8.2-beta
  • v0.8.2-beta-branch
  • v0.8.2-beta-rc1-branch
  • v0.8.2-beta-rc2
  • v0.8.2-beta-rc2-branch
  • v0.9.0-beta
  • v0.9.0-beta-rc1
  • v0.9.0-beta-rc2
  • v0.9.0-beta-rc3
  • v0.9.0-beta-rc4
  • v19-rc4
  • validate-mpp
  • walletkit-docs-target-conf
  • writeOpaqueAddr
  • yy-beat-itest-flakes
  • yy-beat-itest-optimize
  • yy-beat-itest-shuffle
  • yy-blockbeat-itest
  • yy-design-dyn
  • yy-feature-blockbeat
  • yy-fix-wire-msg-1
  • yy-more-flakes
  • yy-pending-remote-commit
  • yy-prepare-fee-replace
  • yy-sweeper-fix
  • yy-waiting-on-merge

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

Relevant lines Covered
Build:
Build:
178344 RELEVANT LINES 102587 COVERED LINES
24734.33 HITS PER LINE
Source Files on optimize-context-guard
  • Tree
  • List 852
  • Changed 207
  • Source Changed 0
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
12583319996 optimize-context-guard 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... Pull #9361 02 Jan 2025 01:59PM UTC starius github
57.52
12332481256 optimize-context-guard 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... Pull #9361 14 Dec 2024 07:40PM UTC starius github
58.66
12332123475 optimize-context-guard fn/ContextGuard: clear store of cancel funcs If ContextGuard lives for some time after Quit method is called, the map won't be collected by GC. Optimization. Pull #9361 14 Dec 2024 06:42PM UTC starius github
58.62
See All Builds (13296)
  • Repo on GitHub
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