lightninglabs / taproot-assets

A layer 1 daemon, for the Taproot Assets Protocol specification, written in Go (golang)
MIT License
439 stars 106 forks source link

Add field `UnconfirmedTransfers` to RPC endpoint `ListAssets` #969

Closed ffranr closed 5 days ago

ffranr commented 6 days ago

Added a new field UnconfirmedTransfers to the ListAssets RPC endpoint response. The field is a count of unconfirmed transfers. This field helps users interpret asset list responses, especially when asset coins are unconfirmed.

This change will hopeful help users understand this sort of situation: https://github.com/lightninglabs/taproot-assets/issues/964

dstadulis commented 6 days ago

Existing issue that might be closed by this PR: https://github.com/lightninglabs/taproot-assets/issues/645

Would #969 support reporting pendingchannels in lnd?

ffranr commented 6 days ago

Existing issue that might be closed by this PR: #645

Would #969 support reporting pendingchannels in lnd?

I think pending channels count towards the unconfirmed transfers counter that's being added in this PR.

ffranr commented 5 days ago

Related to @guggero 's comment earlier (#969 (comment)) I think that the Go Doc comment of QueryParcels is incorrect.

https://github.com/lightninglabs/taproot-assets/blob/eeb8a5b1a7fa32fa0b40c6b04abfe7415853af50/tapdb/assets_store.go#L3020

It should probably read something like this:

// QueryParcels returns the set of confirmed and unconfirmed parcels or exclusively the unconfirmed parcels.

Yes. But I think I'm using QueryParcels correctly in this PR.