test: let daemon create a new pre-image in the multi-hop test
If the RPreimage field is left off when adding a new invoice, the daemon will create a new random pre-image itself for the requested payment.
This commit is contained in:
parent
ec0c7c5989
commit
d3612ac00a
@ -753,10 +753,8 @@ func testMultiHopPayments(net *networkHarness, t *harnessTest) {
|
|||||||
const paymentAmt = 1000
|
const paymentAmt = 1000
|
||||||
rHashes := make([][]byte, numPayments)
|
rHashes := make([][]byte, numPayments)
|
||||||
for i := 0; i < numPayments; i++ {
|
for i := 0; i < numPayments; i++ {
|
||||||
preimage := bytes.Repeat([]byte{byte(i)}, 32)
|
|
||||||
invoice := &lnrpc.Invoice{
|
invoice := &lnrpc.Invoice{
|
||||||
Memo: "testing",
|
Memo: "testing",
|
||||||
RPreimage: preimage,
|
|
||||||
Value: paymentAmt,
|
Value: paymentAmt,
|
||||||
}
|
}
|
||||||
resp, err := net.Bob.AddInvoice(ctxb, invoice)
|
resp, err := net.Bob.AddInvoice(ctxb, invoice)
|
||||||
@ -1596,6 +1594,7 @@ func testHtlcErrorPropagation(net *networkHarness, t *harnessTest) {
|
|||||||
if err := carol.shutdown(); err != nil {
|
if err := carol.shutdown(); err != nil {
|
||||||
t.Fatalf("unable to shutdown carol: %v", err)
|
t.Fatalf("unable to shutdown carol: %v", err)
|
||||||
}
|
}
|
||||||
|
time.Sleep(time.Second * 2)
|
||||||
alicePayStream, err = net.Alice.SendPayment(ctxb)
|
alicePayStream, err = net.Alice.SendPayment(ctxb)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("unable to create payment stream: %v", err)
|
t.Fatalf("unable to create payment stream: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user