[input-output-hk/cardano-sl] Added endpoint for unspent transaction outputs (#3009)

refi93 commented on this pull request.

> @@ -366,6 +370,32 @@ getAddressSummary cAddr = do
ATRedeem -> CRedeemAddress
ATUnknown {} -> CUnknownAddress

+
+getAddressUtxoBulk
+ :: (HasNodeConfiguration, ExplorerMode ctx m)
+ => [CAddress]
+ -> m [CUtxo]
+getAddressUtxoBulk cAddrs = do
+ when (not explorerExtendedApi) $

In this case it was more a matter of need for my use case (a light wallet with multiple addresses) given the current performance limitations of the database when fetching utxo for a single address, but I believe that it would be generally useful to have a bulk API for addresses. E.g. getting a paginated chronologically ordered transaction history for multiple addresses would be quite cumbersome without a bulk API, which is a different issue of course, but I had it in mind when adding this first bulk endpoint.

Ok, I restricted the amount of addresses to 10, as you suggested. Maybe it would be nice to have this constant customizable in the config but I don’t want to pollute the config file too much and I see that other constants around are also hard coded. What do you think @ksaric ?

Добавить комментарий