Send asset multiple times to a single address

+1 vote
I'm trying to send to a single asset to a single address several times in a row.

The sendassettoaddress function returns a txid normally,
but when I check the balance using getaddressbalances the amount is the same

This only works a few times, maybe 5 or 10 times but after that the balance get stuck
asked May 29, 2016 by Lucas

1 Answer

0 votes

The issue may be related to the minconf parameter of getaddressbalances, since its default value is 1 meaning it only shows amounts that have been confirmed. So if mining is stuck for some reason it will stop updating unless you use minconf=0 in the API call. You can check if mining is stuck using the getinfo command to see if the blocks value is increasing - if it is, it is probably because you have mining-requires-peers set to true but only one node is active.

answered May 30, 2016 by MultiChain
The mining-requires-peers  is set to false and I don't believe that the problem is the mining
because if I try to send the same asset to a new address it will work fine for the first 5 10 times
I've said that the balance get stuck but it will not get stuck forever, if I keep going and send the same sendassettoaddress to the address again and again it will work sometime, maybe after 10 20 tries

Also the blocks numbers are increasing and the minfconf is set to 0

this is my consensus in params.dat:

mining-diversity = 0.0                  
admin-consensus-admin = 0.5             
admin-consensus-activate = 0.5          
admin-consensus-mine = 0.5              
admin-consensus-issue = 0.0             
mining-requires-peers = false
In that case, perhaps it's sending the asset from the same address back to itself some times, and other times not. Try using sendfromaddress for more control of which address it's being sent from, and which address it's being sent to.
...