mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 18:06:18 +02:00
htlcswitch: check channel policy for local htlcs
This commit is contained in:
@@ -612,6 +612,8 @@ type mockChannelLink struct {
|
||||
eligible bool
|
||||
|
||||
htlcID uint64
|
||||
|
||||
htlcSatifiesPolicyLocalResult lnwire.FailureMessage
|
||||
}
|
||||
|
||||
// completeCircuit is a helper method for adding the finalized payment circuit
|
||||
@@ -675,6 +677,13 @@ func (f *mockChannelLink) HtlcSatifiesPolicy([32]byte, lnwire.MilliSatoshi,
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *mockChannelLink) HtlcSatifiesPolicyLocal(payHash [32]byte,
|
||||
amt lnwire.MilliSatoshi, timeout uint32,
|
||||
heightNow uint32) lnwire.FailureMessage {
|
||||
|
||||
return f.htlcSatifiesPolicyLocalResult
|
||||
}
|
||||
|
||||
func (f *mockChannelLink) Stats() (uint64, lnwire.MilliSatoshi, lnwire.MilliSatoshi) {
|
||||
return 0, 0, 0
|
||||
}
|
||||
@@ -728,7 +737,7 @@ func newDB() (*channeldb.DB, func(), error) {
|
||||
return cdb, cleanUp, nil
|
||||
}
|
||||
|
||||
const testInvoiceCltvExpiry = 4
|
||||
const testInvoiceCltvExpiry = 6
|
||||
|
||||
type mockInvoiceRegistry struct {
|
||||
settleChan chan lntypes.Hash
|
||||
|
Reference in New Issue
Block a user