-
Notifications
You must be signed in to change notification settings - Fork 12
multi: Use Lightning Labs mainnet mempool endpoint #1166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,9 +8,10 @@ import ( | |
| ) | ||
|
|
||
| const ( | ||
| // DefaultEsploraURLMainnet is the public mempool.space | ||
| // Esplora-compatible REST API for mainnet. | ||
| DefaultEsploraURLMainnet = "https://mempool.space/api" | ||
| // DefaultEsploraURLMainnet is the Esplora-compatible REST API for | ||
| // mainnet, backed by a Lightning Labs-operated mempool instance. | ||
| DefaultEsploraURLMainnet = "https://mempool.staging." + | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 The mainnet default for all lwwallet chain access is now a host explicitly named Why this mattersThe same host lands in |
||
| "lightningcluster.com/api" | ||
|
|
||
| // DefaultEsploraURLTestnet3 is the Esplora-compatible REST API for | ||
| // testnet3, backed by a Lightning Labs-operated mempool instance. | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -224,9 +224,8 @@ | |||||
| # feeestimation.mempoolspace.enabled=false | ||||||
|
|
||||||
| # Override the network-default recommended-fee endpoint. Must be an absolute | ||||||
| # https URL. Empty uses the per-network default: public mempool.space on | ||||||
| # mainnet, Lightning Labs-operated mempool instances on testnet3, testnet4, | ||||||
| # and signet. | ||||||
| # https URL. Empty uses a Lightning Labs-operated mempool instance for the | ||||||
| # configured network. | ||||||
|
Comment on lines
226
to
+228
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 The new text — "Empty uses a Lightning Labs-operated mempool instance for the configured network" — reads as though every network has a default, but
Suggested change
|
||||||
| # feeestimation.mempoolspace.url= | ||||||
|
|
||||||
| # Number of blocks after which unroll attempts a fee-bump rebroadcast. The zero | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,9 @@ func lndBaseConfig() *Config { | |
| func TestMempoolSpaceFeeAccessorsAreNilSafe(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| const mainnetURL = "https://mempool.staging.lightningcluster.com/" + | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵
|
||
| "api/v1/fees/recommended" | ||
|
|
||
| cfg := &Config{} | ||
| require.False(t, cfg.MempoolSpaceFeeEnabled()) | ||
| require.Empty(t, cfg.MempoolSpaceFeeURL()) | ||
|
|
@@ -33,13 +36,10 @@ func TestMempoolSpaceFeeAccessorsAreNilSafe(t *testing.T) { | |
|
|
||
| cfg.FeeEstimation.MempoolSpace = &MempoolSpaceFeeConfig{ | ||
| Enabled: true, | ||
| URL: "https://mempool.space/api/v1/fees/recommended", | ||
| URL: mainnetURL, | ||
| } | ||
| require.True(t, cfg.MempoolSpaceFeeEnabled()) | ||
| require.Equal( | ||
| t, "https://mempool.space/api/v1/fees/recommended", | ||
| cfg.MempoolSpaceFeeURL(), | ||
| ) | ||
| require.Equal(t, mainnetURL, cfg.MempoolSpaceFeeURL()) | ||
| } | ||
|
|
||
| // TestDefaultConfigDisablesMempoolSpaceFee locks in that the provider is off by | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡
F3(Minor) — Only positive https case in the validator test now tracks the constant ·chainfees/mempoolspace_test.go:232TestMempoolSpaceEstimatorRejectsInsecureURL's "https ok" row was the table's only fixed positive case for the https-accept path invalidateMempoolSpaceURL; binding it tomempoolSpaceMainnetURLmeans the case's input now moves whenever the default moves, and the row's name stops describing what it pins. Keep the literalhttps://case and add a separate row asserting the mainnet default also validates — that covers both the validator and the constant, instead of trading one for the other.