channeldb+router: record payment failure reason in db
This commit is contained in:
5 files changed
+106
-23
No files matched your search
@@ -167,6 +167,7 @@ type successArgs struct {
|
||||
}
|
||||
|
||||
type failArgs struct {
|
||||
reason channeldb.FailureReason
|
||||
}
|
||||
|
||||
type mockControlTower struct {
|
||||
@@ -253,13 +254,14 @@ func (m *mockControlTower) Success(phash lntypes.Hash,
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *mockControlTower) Fail(phash lntypes.Hash) error {
|
||||
func (m *mockControlTower) Fail(phash lntypes.Hash,
|
||||
reason channeldb.FailureReason) error {
|
||||
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
|
||||
if m.fail != nil {
|
||||
m.fail <- failArgs{}
|
||||
m.fail <- failArgs{reason}
|
||||
}
|
||||
|
||||
delete(m.inflights, phash)
|
||||
|
||||
Reference in new issue
Block a user