lnwallet/test: move htlcDesc struct

This commit is contained in:
Joost Jager 2020-06-02 14:39:52 +02:00
parent c27406b579
commit 997bab0343
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

@ -63,13 +63,6 @@ type testContext struct {
feePerKW btcutil.Amount feePerKW btcutil.Amount
} }
// htlcDesc is a description used to construct each HTLC in each test case.
type htlcDesc struct {
index int
remoteSigHex string
resolutionTxHex string
}
// getHTLC constructs an HTLC based on a configured HTLC with auxiliary data // getHTLC constructs an HTLC based on a configured HTLC with auxiliary data
// such as the remote signature from the htlcDesc. The partially defined HTLCs // such as the remote signature from the htlcDesc. The partially defined HTLCs
// originate from the BOLT 03 spec and are contained in the test context. // originate from the BOLT 03 spec and are contained in the test context.
@ -341,6 +334,13 @@ var testHtlcs = []struct {
}, },
} }
// htlcDesc is a description used to construct each HTLC in each test case.
type htlcDesc struct {
index int
remoteSigHex string
resolutionTxHex string
}
// testCases encode the raw test vectors specified in Appendix C of BOLT 03. // testCases encode the raw test vectors specified in Appendix C of BOLT 03.
var testCases = []struct { var testCases = []struct {
commitment channeldb.ChannelCommitment commitment channeldb.ChannelCommitment