Assets not visible after the simple transaction (within same node)

+2 votes

We are using Multichain with external keys storage, all transactions signed outside of the Multichain. 

Just found a very strange Multichain behavior. After a simple transaction of sending assets from one wallet to another, the said assets became invisible for the getaddressbalances  request for the period of up to 30 seconds. 

1. getaddressbalances  returns 

[{'name': 'XXX', 'assetref': '103-266-56344', 'qty': 99.0}, {'name': 'BTC', 'assetref': '260-267-49373', 'qty': 9.97}]

2. We send  0.01 BTC to another wallet by using: createrawtransaction, sign, sendrawtransaction 

3. After few seconds, getaddressbalances for the senders wallet  returns

[{'name': 'XXX', 'assetref': '103-266-56344', 'qty': 99.0}]

As you can see, the BTC is completely disappeared from the results of the request. 

4. After 15 to 20 seconds getaddressbalances  returns

[{'name': 'XXX', 'assetref': '103-266-56344', 'qty': 99.0}, {'name': 'BTC', 'assetref': '260-267-49373', 'qty': 9.96}]

now, we can see, that 0.01 deducted and the result is fine.

 

So now, we are sending several getaddressbalances  requests in case if one of the expected assets is not visible. But it's not the right way for the production.

It would be great to understand, why it happens and how to avoid this problem ?

 

 

 

 

 

asked Dec 5, 2017 by Dilidonka

1 Answer

+1 vote

This is about requiring transaction confirmations before considering that an asset safely belongs to the wallet. Because you are using external keys, the wallet is less sure that it can trust an unconfirmed transaction will really bring the funds that are promised. The delay is the wait until the transaction is confirmed.

In your case to solve the problem, pass 0 for the second (minconf) parameter to getaddressbalances.

answered Dec 5, 2017 by MultiChain
Thank you so much !
Now all fine !
...