I am designing an api for using custom tokens that I aim to implement on Multichain. The plan is to issue a tranche of tokens to an issuing account and to then distribute from there to members that require tokens.
Because I will be starting with a single output of say 1 million tokens, I'm concerned that I have a concurrency issue straight away in that multiple requests to start distributing the tokens will become blocked if I use "preparelockunspent" to ensure no two requests can spend the same output, or I end up generating doublespends that get dropped by the chain but means I haven't distributed tokens, and not sure I would know when this happens??
Have you considered this and is there a strategy for mitigating this potential issue beyond issuing the tokens in smaller lots so that I have many outputs from which to distribute with?
Your thoughts on this would be appreciated........