-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
config: increase max funding and payment amount 60x under Litecoin #1246
Conversation
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.
This also missed increasing the max payment size.
f90cba3
to
3adc923
Compare
fundingmanager.go
Outdated
// primary chain due to the price difference. | ||
// | ||
// TODO(roasbeef): add command line param to modify | ||
maxFundingAmount = btcutil.Amount(1 << 24) |
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.
IMO it'd be preferable to have enumerate both constants, maxBtcFundingAmount
and maxLtcFundingAmount
similar to how we have for the other constraints.
If we want to make this easy to modify in the future, we can also define something like btcToLtcConversionRate = 60
and compute ltc constants at compile time
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.
Fixed.
config.go
Outdated
registeredChains.RegisterPrimaryChain(litecoinChain) | ||
maxFundingAmount *= 60 | ||
maxPaymentMSat *= 60 |
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.
Instead of doing this scaling here, we can set local maxFundingAmount
or maxPaymentMSat
vars based on which chain is active
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.
Fixed.
13cf1f1
to
0b4287e
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.
fundingmanager.go
Outdated
) | ||
|
||
var ( | ||
// maxBtcFundingAmount is a soft-limit of the maximum channel size |
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.
s/maxBtcFundingAmount/maxFundingAmount/
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.
👆🏾
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.
Fixed.
fundingmanager.go
Outdated
) | ||
|
||
var ( | ||
// maxBtcFundingAmount is a soft-limit of the maximum channel size |
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.
👆🏾
fundingmanager.go
Outdated
// Protocol. This limit is defined in BOLT-0002, and serves as an | ||
// initial precautionary limit while implementations are battle tested | ||
// in the real world. | ||
maxBtcFundingAmount = btcutil.Amount(1 << 24) |
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.
While we're here, this should actually be -1
at the end.
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.
Fixed.
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 🔥
No description provided.