viabtc / viabtc_exchange_server

A trading engine with high-speed performance and real-time notification
MIT License
2.67k stars 1.49k forks source link

Getting NaN in Asset Balance Value #218

Open codeman-crypto opened 4 years ago

codeman-crypto commented 4 years ago

Hi,

When I try to get the asset balance query, I am getting the value NaN in the balance. I try to update the balance but nothing is happening, still getting NaN in balance. Can anyone help me on this.

Also please let me know where the asset balance data are stored.

Thanks in Advance

codeman-crypto commented 4 years ago

@haipome Could you please help me on this? I am unable to add balance to that user. it always returns NaN in the balance

niyas commented 4 years ago

I am also facing the same issue... @objectt can you help resolve this issue

objectt commented 4 years ago

@codeman-crypto @niyas Could you describe the scenario in detail?

niyas commented 4 years ago

@objectt I have mistakenly updated the balance with negative value and it showing me NaN in balance. When I try to update the balance its not getting updated. How do I update the balance back to 0?

objectt commented 4 years ago

@niyas you cannot subtract value bigger than what you currently have. (refer to balance_sub function in me_balance.c). Did you by any chance do something else that have caused the problem?