mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 20:15:18 +02:00
channeldb: convert RevocationLog to use RecordT
This commit is contained in:
committed by
Oliver Gugger
parent
1b1e7a6168
commit
61f276856a
@@ -8,6 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/kvdb"
|
||||
"github.com/lightningnetwork/lnd/lntest/channels"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
@@ -115,12 +116,11 @@ var (
|
||||
}},
|
||||
}
|
||||
|
||||
testRevocationLogNoAmts = RevocationLog{
|
||||
OurOutputIndex: 0,
|
||||
TheirOutputIndex: 1,
|
||||
CommitTxHash: testChannelCommit.CommitTx.TxHash(),
|
||||
HTLCEntries: []*HTLCEntry{&testHTLCEntry},
|
||||
}
|
||||
testRevocationLogNoAmts = NewRevocationLog(
|
||||
0, 1, testChannelCommit.CommitTx.TxHash(),
|
||||
fn.None[lnwire.MilliSatoshi](), fn.None[lnwire.MilliSatoshi](),
|
||||
[]*HTLCEntry{&testHTLCEntry},
|
||||
)
|
||||
testRevocationLogNoAmtsBytes = []byte{
|
||||
// Body length 42.
|
||||
0x2a,
|
||||
@@ -136,14 +136,11 @@ var (
|
||||
0xc8, 0x22, 0x51, 0xb1, 0x5b, 0xa0, 0xbf, 0xd,
|
||||
}
|
||||
|
||||
testRevocationLogWithAmts = RevocationLog{
|
||||
OurOutputIndex: 0,
|
||||
TheirOutputIndex: 1,
|
||||
CommitTxHash: testChannelCommit.CommitTx.TxHash(),
|
||||
HTLCEntries: []*HTLCEntry{&testHTLCEntry},
|
||||
OurBalance: &localBalance,
|
||||
TheirBalance: &remoteBalance,
|
||||
}
|
||||
testRevocationLogWithAmts = NewRevocationLog(
|
||||
0, 1, testChannelCommit.CommitTx.TxHash(),
|
||||
fn.Some(localBalance), fn.Some(remoteBalance),
|
||||
[]*HTLCEntry{&testHTLCEntry},
|
||||
)
|
||||
testRevocationLogWithAmtsBytes = []byte{
|
||||
// Body length 52.
|
||||
0x34,
|
||||
|
Reference in New Issue
Block a user