ergoplatform / ergo

Ergo protocol description & reference client implementation
https://ergoplatform.org/
Creative Commons Zero v1.0 Universal
504 stars 170 forks source link

Add excludeMempoolSpent Query Parameter to /blockchain/box/unspent/byAddress #2131

Closed anon-yum2 closed 4 months ago

anon-yum2 commented 9 months ago

PR addressing issue: https://github.com/ergoplatform/ergo/issues/2093 by default excludeMempoolSpent set to false to not impact any current uses of the endpoint.

anon-yum2 commented 8 months ago

Since filtering out UTXOs after receiving them from mempool may result in less than limit amount of UTXOs being returned (when there are more available), I have added recursive fetching for more UTXOs until the limit is hit or no more UTXOs are available. Will only fetch a limit of 200 UTXOs at a time.

kushti commented 8 months ago

@anon-yum2 compilation is failing now

kushti commented 8 months ago

import scorex.util.{ModifierId, bytesToId} => import scorex.util.{ModifierId, bytesToId, idToBytes}