Commit graph

27 commits

Author SHA1 Message Date
Oli
8047149c6a
multi: upgrade to btcd v2 modules
Migrate all btcd dependencies to the new per-package v2 modules (wire/v2,
txscript/v2, chaincfg/v2, chainhash/v2, btcutil/v2, psbt/v2, btcec/v2)
introduced by btcd v0.26.0, and pin the tagged ecosystem versions:
btcwallet v0.17.0, neutrino v0.18.0 and lightning-onion v1.4.0.

The bulk of the import rewrite was produced by the scripted diff from
https://github.com/btcsuite/btcd/pull/2547 (followed by 'make rpc'). The
address symbols that moved out of btcutil into the new address package
are imported as btcaddr where a local "address" variable would otherwise
shadow them. The go.mod/go.sum updates and the remaining manual
compilation fixes are folded into this single commit so it builds on its
own (the migration was previously split into a reproducible scripted-diff
plus follow-ups, intended to be squashed on merge).
2026-06-24 10:58:36 -07:00
ziggie
92e29a422e
build: bump Go versions 2026-06-08 17:02:58 -03:00
ziggie
d3dad1690d
build: bump Go version to 1.26.3 2026-05-26 15:45:16 -03:00
Gijs van Dam
ea8a665772 queue: add BackpressureQueue[T] with Random Early Drop
Add a generic BackpressureQueue that uses a DropPredicate to proactively
shed load before the queue is completely full.

Two predicate types are provided:
- DropCheckFunc: length-only drop decision (func(queueLen int) bool)
- DropPredicate[T]: item-aware drop decision

RandomEarlyDrop returns a DropCheckFunc since RED only considers queue
depth. The AsDropPredicate helper adapts it to DropPredicate[T] for use
with BackpressureQueue.

In addition to the blocking Enqueue/Dequeue methods, the queue exposes
TryEnqueue (non-blocking send with drop check), Len, ReceiveChan, and
Close. These are needed by the actor package's BackpressureMailbox which
uses BackpressureQueue as its core buffer while implementing the Mailbox
interface's select-based iteration and lifecycle methods.

Property-based tests using pgregory.net/rapid verify queue invariants
(capacity bounds, FIFO ordering, model consistency) across randomized
enqueue/dequeue sequences with RED enabled.
2026-03-28 12:42:53 +01:00
Olaoluwa Osuntokun
ba1fb50380 build+docs: bump minimum Go version to 1.25.5
With Go 1.26 now released, this bumps the minimum required Go version
from 1.24.11 to 1.25.5 across all go.mod files and updates the
installation documentation with the correct download links and SHA256
hashes for Go 1.25.5 binaries.

The build system (Dockerfiles, Makefile, CI) was already using Go 1.25.5,
so this change aligns the go.mod minimum version to match.
2026-02-10 12:54:10 -08:00
ziggie
e26a114cdc
mod: update the minimum go version to 1.24.11
We update the minimum required go version to build the LND
exectuable to the latest minor release of go 1.24.11.
2026-01-13 16:07:38 +01:00
cuinix
60bc30dd08 remove repetitive words
Signed-off-by: cuinix <915115094@qq.com>
2024-03-07 14:05:47 +08:00
positiveblue
09d21345e1
multi: bump Go version
Bump all build go versions to v1.21.0
Bump the minimum build package version to v1.19.0

Debian "buster" is not longer supported. Security updates have been
discontinued since June 30th 2022. We will build using the latest
version, "bookworm".
2023-09-05 10:11:42 -07:00
Eng Zer Jun
7070be52b7
queue: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-10-13 17:47:04 +08:00
Dimitris Apostolou
530a2059e5
multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
naveen
06433d351e
Upgrade to go 1.16 for the left over packages
Upgraded the go to 1.16 for the rest of the packages.
2021-10-19 03:55:13 +00:00
Andras Banki-Horvath
c7fa5ea863 queue: remove unsued waitgroup 2020-04-24 19:15:08 +02:00
Joost Jager
f907fbcadc
queue: detect close of incoming channel 2020-04-08 08:54:03 +02:00
carla
a223e4eedb
queue: add fixed size circular buffer
This commit introduces a fixed size circular buffer  which stores
elements in a fixed size underlying array, wrapping to overwrite items
when the buffer gets full.
2020-03-17 08:22:23 +02:00
Andras Banki-Horvath
ff3063daea queue: fixing doc after cherry pick
This commit just fixes a godoc and adds a new one to the already
merged queue.PriorityQueue.
2019-12-13 16:52:22 +01:00
Andras Banki-Horvath
56282db30a
queue: Introducing a general purpose priority queue.
This commit introduces PriorityQueue, which is a general, heap
based priority queue, and PriorityQueueItem which is an interface
that concrete priority queue items must implement.
This implementation is encapsulated, users do not need to use any
other package for full functionality.
PriorityQueue exports the usual public methids: Push, Pop, Top,
Empty and Len. For full documentaton consult the priority_queue.go,
for usage: priority_queue_test.go
2019-12-11 16:08:05 +01:00
Oliver Gugger
976c996fda
queue: run go mod tidy 2019-09-23 15:11:20 +02:00
Oliver Gugger
567c357c61
ticker+queue: run go mod tidy 2019-07-26 09:29:38 +02:00
Federico Bond
0a9141763e multi: replace manual CAS with sync.Once in several more modules 2019-06-12 09:37:26 -03:00
Olaoluwa Osuntokun
9d23d382fc
Merge pull request #2419 from cfromknecht/brontide-buffer-pool
brontide: read buffer pool
2019-02-18 17:51:17 -08:00
Conner Fromknecht
6f96d04b72
multi: add buffer.Write and pool.WriteBuffer, make GCQueue generic 2019-02-15 19:31:24 -08:00
Wilmer Paulino
9c8b627f80
queue: add module support 2019-02-12 16:17:42 -08:00
Conner Fromknecht
0118120f55
queue/gc_queue_test: adds unit tests for GCQueue 2019-01-31 19:21:32 -08:00
Conner Fromknecht
717672ad83
queue/gc_queue: adds GCQueue to back recyclable pools 2019-01-31 19:21:31 -08:00
Conner Fromknecht
c27b90f76c
queue/queue_test: adds 100% test coverage 2018-12-03 13:58:25 -08:00
Conner Fromknecht
a4442608e6
queue/queue: wait group inner go routines, add idempotency 2018-12-03 13:58:25 -08:00
Johan T. Halseth
dbf9b4ea4c
chainntnfs+queue: move ConcurrentQueue to own package 'queue' 2018-10-18 12:38:10 -07:00