The wallet appears to have sufficient balance, but there are not enough billets available to construct the
transaction. It may be possible to manually solve this problem by sending transactions to yourself to split the wallet
balance into more output billets.
Error:
{
"code" : -6,
"message" : "Insufficient funds"
}
I got a similar messenge too, don't understand how the billets works in the transaction process
The following explanation is based on the intended wallet design, not on actually testing, so the details might be slightly wrong. Assuming the wallet holds a sufficient number of minted billets that all have a value of 1000 units, then to send 8000 units, the wallet will first construct two transactions that have four inputs of 1000 units each, and two outputs, one roughly 3999.9 units (slightly less than 4000 to account for the transaction fee), and one output of zero value (which is a dummy output that makes the transactions publicly appear as a standard 4-in-2-out). After these two transactions clear and the wallet detects them as cleared (which might take 30-60 seconds), the wallet will construct a final transactions with 2 inputs of 3999.9 and one input of 1000, with one output of 8000 units to the intended recipient and one output sending the balance (the change) back it itself. If it takes more than 90 seconds for one of the two intermediate transactions to be detected as cleared, the wallet will abort the send command and return "Insufficient funds". In that case, nothing was sent to the intended recipient, but one of more of the intermediate transactions that sent consolidated funds back to the wallet may still be pending. The amount of time the wallet waits is determined by the command line / configuration file option tx-new-billet-wait-sec, which by default is 90 seconds but we will likely increase that to 120 seconds in a future release based on this feedback. When the wallet returns "Insufficient funds", you can wait a short amount of time and then retry the transaction. The commands listtransactions and listsinceblock can be used to show which prior transactions have still not cleared (zero confirmations). Once the transactions have cleared (1 or more confirmations), then the amounts the wallet expects to receive in those transactions can be spent.