mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
itest: break down taproot tests
This commit is contained in:
parent
efae8ea56f
commit
37b8210f37
2 changed files with 24 additions and 5 deletions
|
@ -469,8 +469,16 @@ var allTestCases = []*lntest.TestCase{
|
||||||
TestFunc: testBumpForceCloseFee,
|
TestFunc: testBumpForceCloseFee,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "taproot",
|
Name: "taproot spend",
|
||||||
TestFunc: testTaproot,
|
TestFunc: testTaprootSpend,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "taproot musig2",
|
||||||
|
TestFunc: testTaprootMuSig2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "taproot import scripts",
|
||||||
|
TestFunc: testTaprootImportScripts,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "simple taproot channel activation",
|
Name: "simple taproot channel activation",
|
||||||
|
|
|
@ -46,9 +46,9 @@ var (
|
||||||
))
|
))
|
||||||
)
|
)
|
||||||
|
|
||||||
// testTaproot ensures that the daemon can send to and spend from taproot (p2tr)
|
// testTaprootSpend ensures that the daemon can send to and spend from taproot
|
||||||
// outputs.
|
// (p2tr) outputs.
|
||||||
func testTaproot(ht *lntest.HarnessTest) {
|
func testTaprootSpend(ht *lntest.HarnessTest) {
|
||||||
alice := ht.NewNode("Alice", nil)
|
alice := ht.NewNode("Alice", nil)
|
||||||
|
|
||||||
testTaprootSendCoinsKeySpendBip86(ht, alice)
|
testTaprootSendCoinsKeySpendBip86(ht, alice)
|
||||||
|
@ -62,6 +62,12 @@ func testTaproot(ht *lntest.HarnessTest) {
|
||||||
ht, alice, txscript.SigHashSingle,
|
ht, alice, txscript.SigHashSingle,
|
||||||
)
|
)
|
||||||
testTaprootSignOutputRawKeySpendRootHash(ht, alice)
|
testTaprootSignOutputRawKeySpendRootHash(ht, alice)
|
||||||
|
}
|
||||||
|
|
||||||
|
// testTaprootMuSig2 ensures that the daemon can send to and spend from taproot
|
||||||
|
// (p2tr) outputs using musig2.
|
||||||
|
func testTaprootMuSig2(ht *lntest.HarnessTest) {
|
||||||
|
alice := ht.NewNodeWithCoins("Alice", nil)
|
||||||
|
|
||||||
muSig2Versions := []signrpc.MuSig2Version{
|
muSig2Versions := []signrpc.MuSig2Version{
|
||||||
signrpc.MuSig2Version_MUSIG2_VERSION_V040,
|
signrpc.MuSig2Version_MUSIG2_VERSION_V040,
|
||||||
|
@ -74,6 +80,11 @@ func testTaproot(ht *lntest.HarnessTest) {
|
||||||
testTaprootMuSig2CombinedLeafKeySpend(ht, alice, version)
|
testTaprootMuSig2CombinedLeafKeySpend(ht, alice, version)
|
||||||
testMuSig2CombineKey(ht, alice, version)
|
testMuSig2CombineKey(ht, alice, version)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// testTaprootImportScripts ensures that the daemon can import taproot scripts.
|
||||||
|
func testTaprootImportScripts(ht *lntest.HarnessTest) {
|
||||||
|
alice := ht.NewNodeWithCoins("Alice", nil)
|
||||||
|
|
||||||
testTaprootImportTapscriptFullTree(ht, alice)
|
testTaprootImportTapscriptFullTree(ht, alice)
|
||||||
testTaprootImportTapscriptPartialReveal(ht, alice)
|
testTaprootImportTapscriptPartialReveal(ht, alice)
|
||||||
|
|
Loading…
Add table
Reference in a new issue