Skip to content

Multi rfq send itest #1097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions itest/assets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1687,14 +1687,18 @@ func payInvoiceWithAssets(t *testing.T, payer, rfqPeer *HarnessNode,
sendReq.MaxShardSizeMsat = 80_000_000
}

var rfqBytes []byte
var rfqBytes, peerPubKey []byte
cfg.rfq.WhenSome(func(i rfqmsg.ID) {
rfqBytes = make([]byte, len(i[:]))
copy(rfqBytes, i[:])
})

if rfqPeer != nil {
peerPubKey = rfqPeer.PubKey[:]
}

request := &tchrpc.SendPaymentRequest{
PeerPubkey: rfqPeer.PubKey[:],
PeerPubkey: peerPubKey,
PaymentRequest: sendReq,
RfqId: rfqBytes,
AllowOverpay: cfg.allowOverpay,
Expand Down Expand Up @@ -1733,8 +1737,8 @@ func payInvoiceWithAssets(t *testing.T, payer, rfqPeer *HarnessNode,
acceptedQuote := quoteMsg.GetAcceptedSellOrder()
require.NotNil(t, acceptedQuote)

peerPubKey := acceptedQuote.Peer
require.Equal(t, peerPubKey, rfqPeer.PubKeyStr)
// peerPubKey := acceptedQuote.Peer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: commented out code.

// require.Equal(t, peerPubKey, rfqPeer.PubKeyStr)

rpcRate := acceptedQuote.BidAssetRate
rate, err := rpcutils.UnmarshalRfqFixedPoint(rpcRate)
Expand Down