@@ -777,16 +777,18 @@ func testSweepAllCoins(ht *lntest.HarnessTest) {
777
777
778
778
// Ensure that we can't send coins to our own Pubkey.
779
779
ainz .RPC .SendCoinsAssertErr (& lnrpc.SendCoinsRequest {
780
- Addr : ainz .RPC .GetInfo ().IdentityPubkey ,
781
- SendAll : true ,
782
- Label : sendCoinsLabel ,
780
+ Addr : ainz .RPC .GetInfo ().IdentityPubkey ,
781
+ SendAll : true ,
782
+ Label : sendCoinsLabel ,
783
+ TargetConf : 6 ,
783
784
})
784
785
785
786
// Ensure that we can't send coins to another user's Pubkey.
786
787
ainz .RPC .SendCoinsAssertErr (& lnrpc.SendCoinsRequest {
787
- Addr : ht .Alice .RPC .GetInfo ().IdentityPubkey ,
788
- SendAll : true ,
789
- Label : sendCoinsLabel ,
788
+ Addr : ht .Alice .RPC .GetInfo ().IdentityPubkey ,
789
+ SendAll : true ,
790
+ Label : sendCoinsLabel ,
791
+ TargetConf : 6 ,
790
792
})
791
793
792
794
// With the two coins above mined, we'll now instruct Ainz to sweep all
@@ -798,23 +800,34 @@ func testSweepAllCoins(ht *lntest.HarnessTest) {
798
800
799
801
// Send coins to a testnet3 address.
800
802
ainz .RPC .SendCoinsAssertErr (& lnrpc.SendCoinsRequest {
801
- Addr : "tb1qfc8fusa98jx8uvnhzavxccqlzvg749tvjw82tg" ,
802
- SendAll : true ,
803
- Label : sendCoinsLabel ,
803
+ Addr : "tb1qfc8fusa98jx8uvnhzavxccqlzvg749tvjw82tg" ,
804
+ SendAll : true ,
805
+ Label : sendCoinsLabel ,
806
+ TargetConf : 6 ,
804
807
})
805
808
806
809
// Send coins to a mainnet address.
807
810
ainz .RPC .SendCoinsAssertErr (& lnrpc.SendCoinsRequest {
808
- Addr : "1MPaXKp5HhsLNjVSqaL7fChE3TVyrTMRT3" ,
811
+ Addr : "1MPaXKp5HhsLNjVSqaL7fChE3TVyrTMRT3" ,
812
+ SendAll : true ,
813
+ Label : sendCoinsLabel ,
814
+ TargetConf : 6 ,
815
+ })
816
+
817
+ // Send coins to a compatible address without specifying fee rate or
818
+ // conf target.
819
+ ainz .RPC .SendCoinsAssertErr (& lnrpc.SendCoinsRequest {
820
+ Addr : ht .Miner .NewMinerAddress ().String (),
809
821
SendAll : true ,
810
822
Label : sendCoinsLabel ,
811
823
})
812
824
813
825
// Send coins to a compatible address.
814
826
ainz .RPC .SendCoins (& lnrpc.SendCoinsRequest {
815
- Addr : ht .Miner .NewMinerAddress ().String (),
816
- SendAll : true ,
817
- Label : sendCoinsLabel ,
827
+ Addr : ht .Miner .NewMinerAddress ().String (),
828
+ SendAll : true ,
829
+ Label : sendCoinsLabel ,
830
+ TargetConf : 6 ,
818
831
})
819
832
820
833
// We'll mine a block which should include the sweep transaction we
@@ -911,10 +924,11 @@ func testSweepAllCoins(ht *lntest.HarnessTest) {
911
924
// If we try again, but this time specifying an amount, then the call
912
925
// should fail.
913
926
ainz .RPC .SendCoinsAssertErr (& lnrpc.SendCoinsRequest {
914
- Addr : ht .Miner .NewMinerAddress ().String (),
915
- Amount : 10000 ,
916
- SendAll : true ,
917
- Label : sendCoinsLabel ,
927
+ Addr : ht .Miner .NewMinerAddress ().String (),
928
+ Amount : 10000 ,
929
+ SendAll : true ,
930
+ Label : sendCoinsLabel ,
931
+ TargetConf : 6 ,
918
932
})
919
933
920
934
// With all the edge cases tested, we'll now test the happy paths of
@@ -940,8 +954,9 @@ func testSweepAllCoins(ht *lntest.HarnessTest) {
940
954
// Let's send some coins to the main address.
941
955
const amt = 123456
942
956
resp := ainz .RPC .SendCoins (& lnrpc.SendCoinsRequest {
943
- Addr : mainAddrResp .Address ,
944
- Amount : amt ,
957
+ Addr : mainAddrResp .Address ,
958
+ Amount : amt ,
959
+ TargetConf : 6 ,
945
960
})
946
961
block := ht .MineBlocksAndAssertNumTxes (1 , 1 )[0 ]
947
962
sweepTx := block .Transactions [1 ]
@@ -1024,6 +1039,7 @@ func testListAddresses(ht *lntest.HarnessTest) {
1024
1039
Addr : addr ,
1025
1040
Amount : addressDetail .Balance ,
1026
1041
SpendUnconfirmed : true ,
1042
+ TargetConf : 6 ,
1027
1043
})
1028
1044
}
1029
1045
0 commit comments