-
Notifications
You must be signed in to change notification settings - Fork 2.3k
multi: remove deprecated RPCs and config flags scheduled for 0.21 #10795
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
Closed
erickcestari
wants to merge
11
commits into
lightningnetwork:master
from
erickcestari:remove-deprecated-rpcs-20
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d075700
routerrpc: remove deprecated outgoing_chan_id field handling
erickcestari 328774b
lncfg: remove deprecated tor v2 support
erickcestari a20d36b
itest: migrate deprecated lnrpc Send* calls to routerrpc V2
erickcestari 775bbde
lnrpc: remove deprecated Send* RPC server implementations
erickcestari 34840a8
routerrpc: remove deprecated SendPayment, SendToRoute, TrackPayment i…
erickcestari 76ebb39
proto: remove deprecated SendPayment, SendToRoute, TrackPayment RPCs
erickcestari 513c8f0
docs: document deprecated RPC and config flag removals in 0.21 releas…
erickcestari 20021f6
proto: remove orphan SendToRouteResponse and outgoing_chan_id fields
erickcestari 30ed7a6
multi: remove tor v2 onion address encoder paths
erickcestari e0a662d
multi: keep wire codec faithful for legacy v2 onion addresses
erickcestari 37920fc
multi: persist v2 onion addresses and filter at consumption sites
erickcestari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| package channeldb | ||
|
|
||
| import ( | ||
| "bytes" | ||
| "net" | ||
| "testing" | ||
|
|
||
| "github.com/lightningnetwork/lnd/tor" | ||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| // TestWriteElementSingleAddrRoundTrip ensures the scalar net.Addr write path | ||
| // round-trips a supported address through the channeldb codec. | ||
| func TestWriteElementSingleAddrRoundTrip(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| want := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 9735} | ||
|
|
||
| var buf bytes.Buffer | ||
| require.NoError(t, WriteElement(&buf, net.Addr(want))) | ||
|
|
||
| var got net.Addr | ||
| require.NoError(t, ReadElement(&buf, &got)) | ||
| require.Equal(t, want.String(), got.String()) | ||
| } | ||
|
|
||
| // TestWriteElementAddrSlicePreservesV2 verifies that the length-prefixed | ||
| // []net.Addr write path persists legacy v2 onion entries instead of dropping | ||
| // them. Storage must round-trip the exact address set a peer signed, so v2 is | ||
| // kept on disk and filtered only at consumption time (dial logic, RPC). | ||
| func TestWriteElementAddrSlicePreservesV2(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| v2 := &tor.OnionAddr{ | ||
| // 16 base32 chars + ".onion" = 22 chars = tor.V2Len. | ||
| OnionService: "abcdefghijklmnop.onion", | ||
| Port: 9735, | ||
| } | ||
| tcp := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 9735} | ||
|
|
||
| var buf bytes.Buffer | ||
| require.NoError(t, WriteElement(&buf, []net.Addr{v2, tcp})) | ||
|
|
||
| var got []net.Addr | ||
| require.NoError(t, ReadElement(&buf, &got)) | ||
| require.Len(t, got, 2) | ||
| require.Equal(t, v2.String(), got[0].String()) | ||
| require.Equal(t, tcp.String(), got[1].String()) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.