mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-03 18:22:25 +02:00
lnwallet/channel: make ErrCommitSyncLocalDataLoss type
This commit converts the ErrCommitSyncLocalDataLoss error into a struct, that also holds the received last unrevoked commit point from the remote party.
This commit is contained in:
@@ -3688,7 +3688,7 @@ func TestChanSyncFailure(t *testing.T) {
|
||||
|
||||
// Alice should detect from Bob's message that she lost state.
|
||||
_, _, _, err = aliceOld.ProcessChanSyncMsg(bobSyncMsg)
|
||||
if err != ErrCommitSyncLocalDataLoss {
|
||||
if _, ok := err.(*ErrCommitSyncLocalDataLoss); !ok {
|
||||
t.Fatalf("wrong error, expected "+
|
||||
"ErrCommitSyncLocalDataLoss instead got: %v",
|
||||
err)
|
||||
@@ -4377,7 +4377,7 @@ func TestChanSyncInvalidLastSecret(t *testing.T) {
|
||||
// Alice's former self should conclude that she possibly lost data as
|
||||
// Bob is sending a valid commit secret for the latest state.
|
||||
_, _, _, err = aliceOld.ProcessChanSyncMsg(bobChanSync)
|
||||
if err != ErrCommitSyncLocalDataLoss {
|
||||
if _, ok := err.(*ErrCommitSyncLocalDataLoss); !ok {
|
||||
t.Fatalf("wrong error, expected ErrCommitSyncLocalDataLoss "+
|
||||
"instead got: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user