-
Notifications
You must be signed in to change notification settings - Fork 132
Description
Background
While working through calling the AddAssetSellOrder rpc and using the docs as a guide, I've found the peer_pub_key in reality is a required field while documented as optional:
Your environment
This was running tapd version "0.6.1-alpha commit=v0.6.1", lnd version "0.19.3-beta" and litd version "0.15.2-alpha". Tapd is being run as a subprocess to litd.
Steps to reproduce
The documentation for the proto messages lives here:
taproot-assets/taprpc/rfqrpc/rfq.proto
Line 188 in 4ffe39f
bytes peer_pub_key = 4; |
The logic which doesn't follow that documentation lives here:
Line 7935 in 4ffe39f
// Currently, we require the peer to be specified in the buy order. |
It is interesting that the unmarshaling correctly (as based on the docs) handles the peer pubkey as optional:
Line 7876 in 4ffe39f
var peer fn.Option[route.Vertex] |
Additionally, the comments above where the error occurs also seem to be talking about a buy order while we are in the sell order logic.
Expected behavior
Either the documentation should be updated to explain that the peer pubkey is required for a sell order, or the logic on handling that rpc command should match with it being optional.
Actual behavior
Documentation and code are out of sync and we get back the error "sell order peer must be specified" when trying to request a sell order without providing the peer pubkey to use.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status