mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-08 14:57:38 +02:00
channeldb: convert RevocationLog to use RecordT
This commit is contained in:
committed by
Oliver Gugger
parent
1b1e7a6168
commit
61f276856a
@@ -584,9 +584,11 @@ func assertCommitmentEqual(t *testing.T, a, b *ChannelCommitment) {
|
||||
func assertRevocationLogEntryEqual(t *testing.T, c *ChannelCommitment,
|
||||
r *RevocationLog) {
|
||||
|
||||
t.Helper()
|
||||
|
||||
// Check the common fields.
|
||||
require.EqualValues(
|
||||
t, r.CommitTxHash, c.CommitTx.TxHash(), "CommitTx mismatch",
|
||||
t, r.CommitTxHash.Val, c.CommitTx.TxHash(), "CommitTx mismatch",
|
||||
)
|
||||
|
||||
// Now check the common fields from the HTLCs.
|
||||
@@ -820,10 +822,10 @@ func TestChannelStateTransition(t *testing.T) {
|
||||
|
||||
// Check the output indexes are saved as expected.
|
||||
require.EqualValues(
|
||||
t, dummyLocalOutputIndex, diskPrevCommit.OurOutputIndex,
|
||||
t, dummyLocalOutputIndex, diskPrevCommit.OurOutputIndex.Val,
|
||||
)
|
||||
require.EqualValues(
|
||||
t, dummyRemoteOutIndex, diskPrevCommit.TheirOutputIndex,
|
||||
t, dummyRemoteOutIndex, diskPrevCommit.TheirOutputIndex.Val,
|
||||
)
|
||||
|
||||
// The two deltas (the original vs the on-disk version) should
|
||||
@@ -865,10 +867,10 @@ func TestChannelStateTransition(t *testing.T) {
|
||||
|
||||
// Check the output indexes are saved as expected.
|
||||
require.EqualValues(
|
||||
t, dummyLocalOutputIndex, diskPrevCommit.OurOutputIndex,
|
||||
t, dummyLocalOutputIndex, diskPrevCommit.OurOutputIndex.Val,
|
||||
)
|
||||
require.EqualValues(
|
||||
t, dummyRemoteOutIndex, diskPrevCommit.TheirOutputIndex,
|
||||
t, dummyRemoteOutIndex, diskPrevCommit.TheirOutputIndex.Val,
|
||||
)
|
||||
|
||||
assertRevocationLogEntryEqual(t, &oldRemoteCommit, prevCommit)
|
||||
|
Reference in New Issue
Block a user