-
Notifications
You must be signed in to change notification settings - Fork 118
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
[1/?] Static Loop-In Address - Create #642
[1/?] Static Loop-In Address - Create #642
Conversation
9818ae1
to
d28f6b7
Compare
d28f6b7
to
00e42c6
Compare
a6ed4ed
to
85a284b
Compare
85a284b
to
f639abc
Compare
0bfc4c4
to
2bfc438
Compare
2bfc438
to
a6e9b60
Compare
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.
Great work! Did just a very light pass to see where the PR is.
a6e9b60
to
5cce8dc
Compare
d62812f
to
4081190
Compare
fbc2861
to
bd53ae5
Compare
bd53ae5
to
3d3fe49
Compare
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.
LGTM (just needs clean rebase to a fresh master) 🎉 🎉
3d3fe49
to
8a19ac9
Compare
@sputn1ck: review reminder |
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.
Very close, tested this out and works great.
Just a small db optmization we could do and a ux thing IMO
swapserverrpc/server.proto
Outdated
|
||
message ServerAddressParameters { | ||
// A unique identifier for static address parameters assigned by the server. | ||
bytes id = 1; |
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.
I don't think a unique identifier is needed. Both server and client can just use the pkscript
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.
I thought this might be handy once we enable multple static addresses per client?
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.
They will also have a unique scriptkey, as both parties should not reuse keys.
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.
Removed this ID
// NewAddress starts a new address creation flow. | ||
func (m *Manager) NewAddress(ctx context.Context) (*AddressParameters, | ||
error) { | ||
|
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.
Doesn't it make sense to fetch an existing address first and return this? As we're not supporting multiple addresses we can have this first check here. I think on the cli it would make sense to just return the current address if you run loopcli s new
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.
done
2723522
to
4570bfd
Compare
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.
LGTM!!!! Great job and happy start to the merge journey
4570bfd
to
4d2ae0c
Compare
This draft PR implements static address generation for loop-ins.
It includes new command line options for
loop
, namely~$ loop in static new
a.k.a~$ loop in s n
.Missing features to consider this PR complete are: