Skip to content

Commit e422731

Browse files
committed
itest: verify persistence of rfq policies across restarts
1 parent 52f2fef commit e422731

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

itest/rfq_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,19 @@ func testRfqAssetBuyHtlcIntercept(t *harnessTest) {
228228
expectedAssetID := mintedAssetId
229229
require.Equal(t.t, expectedAssetID, actualAssetID)
230230

231+
// Restart Bob's tapd to ensure the accepted quote policy survives a
232+
// restart and is restored.
233+
require.NoError(t.t, ts.BobTapd.stop(false))
234+
require.NoError(t.t, ts.BobTapd.start(false))
235+
236+
// Carol should still see the accepted quote after Bob's restart.
237+
acceptedQuotes, err = ts.CarolTapd.QueryPeerAcceptedQuotes(
238+
ctxt, &rfqrpc.QueryPeerAcceptedQuotesRequest{},
239+
)
240+
require.NoError(t.t, err)
241+
require.Len(t.t, acceptedQuotes.BuyQuotes, 1)
242+
acceptedQuote = acceptedQuotes.BuyQuotes[0]
243+
231244
// Carol will now use the accepted quote (received from Bob) to create
232245
// a lightning invoice which will be given to and settled by Alice.
233246
//

0 commit comments

Comments
 (0)