mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 11:09:23 +01:00
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
1 changed files with 3 additions and 4 deletions
|
@ -753,11 +753,9 @@ func testMultiHopPayments(net *networkHarness, t *harnessTest) {
|
|||
const paymentAmt = 1000
|
||||
rHashes := make([][]byte, numPayments)
|
||||
for i := 0; i < numPayments; i++ {
|
||||
preimage := bytes.Repeat([]byte{byte(i)}, 32)
|
||||
invoice := &lnrpc.Invoice{
|
||||
Memo: "testing",
|
||||
RPreimage: preimage,
|
||||
Value: paymentAmt,
|
||||
Memo: "testing",
|
||||
Value: paymentAmt,
|
||||
}
|
||||
resp, err := net.Bob.AddInvoice(ctxb, invoice)
|
||||
if err != nil {
|
||||
|
@ -1596,6 +1594,7 @@ func testHtlcErrorPropagation(net *networkHarness, t *harnessTest) {
|
|||
if err := carol.shutdown(); err != nil {
|
||||
t.Fatalf("unable to shutdown carol: %v", err)
|
||||
}
|
||||
time.Sleep(time.Second * 2)
|
||||
alicePayStream, err = net.Alice.SendPayment(ctxb)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create payment stream: %v", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue