mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 11:09:23 +01:00
lnwallet: lint bolt 3 test vectors func
This commit is contained in:
parent
15da50df10
commit
09ff853b9c
1 changed files with 6 additions and 3 deletions
|
@ -304,10 +304,12 @@ func testVectors(t *testing.T, chanType channeldb.ChannelType, test testCase) {
|
|||
remoteSig, remoteHtlcSigs, _, err := remoteChannel.SignNextCommitment()
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, test.RemoteSigHex, hex.EncodeToString(remoteSig.ToSignatureBytes()))
|
||||
require.Equal(t, test.RemoteSigHex,
|
||||
hex.EncodeToString(remoteSig.ToSignatureBytes()))
|
||||
|
||||
for i, sig := range remoteHtlcSigs {
|
||||
require.Equal(t, test.HtlcDescs[i].RemoteSigHex, hex.EncodeToString(sig.ToSignatureBytes()))
|
||||
require.Equal(t, test.HtlcDescs[i].RemoteSigHex,
|
||||
hex.EncodeToString(sig.ToSignatureBytes()))
|
||||
}
|
||||
|
||||
err = localChannel.ReceiveNewCommitment(remoteSig, remoteHtlcSigs)
|
||||
|
@ -325,7 +327,8 @@ func testVectors(t *testing.T, chanType channeldb.ChannelType, test testCase) {
|
|||
var txBytes bytes.Buffer
|
||||
require.NoError(t, forceCloseSum.CloseTx.Serialize(&txBytes))
|
||||
|
||||
require.Equal(t, test.ExpectedCommitmentTxHex, hex.EncodeToString(txBytes.Bytes()))
|
||||
require.Equal(t, test.ExpectedCommitmentTxHex,
|
||||
hex.EncodeToString(txBytes.Bytes()))
|
||||
|
||||
// Obtain the second level transactions that the local node's channel
|
||||
// state machine has produced. Store them in a map indexed by commit tx
|
||||
|
|
Loading…
Add table
Reference in a new issue