mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-12 07:08:24 +01:00
Notes on payment amount
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
266c121510
commit
b3f812e5da
@@ -20,6 +20,9 @@ type FundingRequest struct {
|
||||
//which is a payment to the responder
|
||||
//(This can be used to fund the Reserve)
|
||||
//If the responder disagrees, then the funding request fails
|
||||
//THIS VALUE GOES INTO THE RESPONDER'S FUNDING AMOUNT
|
||||
//total requester input value = RequesterFundingAmount + PaymentAmount + "Total Change"
|
||||
//RequesterFundingAmount = "Available Balance" - RequesterReserveAmount
|
||||
PaymentAmount btcutil.Amount
|
||||
|
||||
//Minimum number of confirmations to validate transaction
|
||||
@@ -169,10 +172,6 @@ func (c *FundingRequest) Validate() error {
|
||||
if c.PaymentAmount < 0 {
|
||||
return fmt.Errorf("This wallet requieres payment to be greater than zero.")
|
||||
}
|
||||
//The payment must be below our own contribution (less reserve kept for ourselves
|
||||
if c.PaymentAmount > c.RequesterFundingAmount-c.RequesterReserveAmount {
|
||||
return fmt.Errorf("Payment too large")
|
||||
}
|
||||
|
||||
//Make sure there's not more than 127 inputs
|
||||
if len(c.Inputs) > 127 {
|
||||
|
||||
Reference in New Issue
Block a user