@@ -18,6 +18,7 @@ var sweepTimeLockManualCases = []struct {
1818 keyIndex uint32
1919 timeLockAddr string
2020 remoteRevPubKey string
21+ params * chaincfg.Params
2122}{{
2223 // New format with ECDH revocation root.
2324 baseKey : "tprv8dgoXnQWBN4CGGceRYMW495kWcrUZKZVFwMmbzpduFp1D4pi" +
@@ -27,6 +28,7 @@ var sweepTimeLockManualCases = []struct {
2728 "lx9xesmcl5qx" ,
2829 remoteRevPubKey : "03235261ed5aaaf9fec0e91d5e1a4d17f1a2c7442f1c43806d" +
2930 "32c9bd34abd002a3" ,
31+ params : & chaincfg .RegressionNetParams ,
3032}, {
3133 // Old format with plain private key as revocation root.
3234 baseKey : "tprv8dgoXnQWBN4CGGceRYMW495kWcrUZKZVFwMmbzpduFp1D4pi" +
@@ -36,6 +38,7 @@ var sweepTimeLockManualCases = []struct {
3638 "hs8xlsfdc3zf" ,
3739 remoteRevPubKey : "03e82cdf164ce5aba253890e066129f134ca8d7e072ce5ad55" +
3840 "c721b9a13545ee04" ,
41+ params : & chaincfg .RegressionNetParams ,
3942}, {
4043 // New format with ECDH revocation root.
4144 baseKey : "tprv8fCiPGhoYhWESQg3kgubCizcHo21drnP9Fa5j9fFKCmbME" +
@@ -45,6 +48,7 @@ var sweepTimeLockManualCases = []struct {
4548 "3rlw45qzmjqrr" ,
4649 remoteRevPubKey : "02dfecdc259a7e1cff36a67328ded3b4dae30369a3035e4f91" +
4750 "1ce7ac4a80b28e5d" ,
51+ params : & chaincfg .RegressionNetParams ,
4852}, {
4953 // Old format with plain private key as revocation root. Test data
5054 // created with lnd v0.12.0-beta (old shachain root creation)
@@ -55,6 +59,7 @@ var sweepTimeLockManualCases = []struct {
5559 "dst0wsk0xags" ,
5660 remoteRevPubKey : "03647afa9c04025e997a5b7ecd2dd949f8f60f6880a94af73a" +
5761 "0d4f48f166d127d1" ,
62+ params : & chaincfg .RegressionNetParams ,
5863}, {
5964 // New format with ECDH revocation root but this test data was created
6065 // when already the old format was present, this leads to the situation
@@ -69,6 +74,7 @@ var sweepTimeLockManualCases = []struct {
6974 "rhetju2srseqrh" ,
7075 remoteRevPubKey : "0341692a025ad552c62689a630ff24d9439e3752d8e0ac5cb4" +
7176 "1b5e71ab2bd46d0f" ,
77+ params : & chaincfg .RegressionNetParams ,
7278}, {
7379 // Anchor channel with lnd 0.18.x-beta.
7480 rootKey : "tprv8ZgxMBicQKsPdRiEUwMA71fkU9XoiPakhuSAEGCfcpgZxraB" +
@@ -79,6 +85,7 @@ var sweepTimeLockManualCases = []struct {
7985 "sup4qa2384v" ,
8086 remoteRevPubKey : "028a2199d9c64f21b59c01a5d5429fbe78b8709f0270deaf91" +
8187 "578f682b87a12796" ,
88+ params : & chaincfg .RegressionNetParams ,
8289}}
8390
8491func TestSweepTimeLockManual (t * testing.T ) {
@@ -87,7 +94,7 @@ func TestSweepTimeLockManual(t *testing.T) {
8794 // brute force the script with the information we have. If not,
8895 // we can't continue anyway.
8996 lockScript , err := lnd .GetP2WSHScript (
90- tc .timeLockAddr , & chaincfg . RegressionNetParams ,
97+ tc .timeLockAddr , tc . params ,
9198 )
9299 require .NoError (t , err )
93100
@@ -108,7 +115,7 @@ func TestSweepTimeLockManual(t *testing.T) {
108115
109116 _ , _ , _ , _ , _ , err = tryKey (
110117 baseKey , revPubKey , 0 , defaultCsvLimit , lockScript ,
111- tc .keyIndex , 500 ,
118+ tc .keyIndex , 1000 ,
112119 )
113120 require .NoError (t , err )
114121 }
0 commit comments