beijing2008 (OP)
Jr. Member
Offline
Activity: 36
Merit: 10
|
|
June 25, 2014, 04:34:22 PM |
|
When I withdraw from the PHP exchange website, An error happened. I get the notice “Account has insufficient funds” from the error data by wireshark.
And then I check the Bitcoin sourcecode and find these:
// Check funds int64 nBalance = GetAccountBalance(strAccount, nMinDepth); if (nAmount > nBalance) - throw JSONRPCError(-6, "Account has insufficient funds"); + throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); '
The wallet in the server do has enough funds, so what reason it might be?
|
|
|
|
|
|
|
|
"The nature of Bitcoin is such that once version 0.1 was released, the
core design was set in stone for the rest of its lifetime." -- Satoshi
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
GoldenWings91
|
|
June 25, 2014, 04:53:39 PM |
|
The account that you are trying to withdraw from doesn't have enough funds assigned to it.
|
|
|
|
beijing2008 (OP)
Jr. Member
Offline
Activity: 36
Merit: 10
|
|
June 25, 2014, 05:17:41 PM |
|
The account that you are trying to withdraw from doesn't have enough funds assigned to it.
There is actually enough funds in the Wallet Client. Do you mean there is not enough from the account? For example, there is 100000000 coins in the wallet but there is only 20 from the address XXXXXXXXXXX in the wallet. So I can't withdraw more than 20 ?
|
|
|
|
grue
Legendary
Offline
Activity: 2058
Merit: 1431
|
|
June 25, 2014, 05:24:52 PM |
|
no, accounts are independent of addresses.
|
|
|
|
Dare
|
|
June 25, 2014, 07:29:56 PM |
|
If you're using an account with insufficient funds allocated to it, then you won't be able to withdraw from it, even if other accounts in the wallet collectively have enough. You'll need to either rearrange the addresses behind your accounts, send more funds to the one you're attempting to withdraw from, or withdraw from either a different account or multiple accounts.
|
|
|
|
kuji kiri
Newbie
Offline
Activity: 9
Merit: 0
|
|
June 25, 2014, 10:08:15 PM |
|
I would advise you to use a separate database for bookkeeping.
|
|
|
|
Sydboy
|
|
June 26, 2014, 05:52:06 PM |
|
Are you in the process of setting up an exchange ?
|
|
|
|
Sydboy
|
|
June 26, 2014, 05:53:30 PM |
|
and perhaps the tx fee, if applicable was not taken into account ? when the account balance was looked up.
|
|
|
|
beijing2008 (OP)
Jr. Member
Offline
Activity: 36
Merit: 10
|
|
June 27, 2014, 06:17:43 AM |
|
May I understan your mean like this:
If a wallet of XXXCoin has two address 123xxxxxxxxxxx and 456xxxxxxxxxxxxx and
1000 coins with the address 123xxxxxxxxxxxxx 0 coin with the address 456xxxxxxxxxxxxxx
then I can't withdraw from the address 456xxxxxxxxxx even 1 coin ?
|
|
|
|
beijing2008 (OP)
Jr. Member
Offline
Activity: 36
Merit: 10
|
|
June 27, 2014, 06:23:31 AM |
|
Are you in the process of setting up an exchange ?
Yes I am can you help?
|
|
|
|
Dare
|
|
June 27, 2014, 06:40:42 AM |
|
May I understan your mean like this:
If a wallet of XXXCoin has two address 123xxxxxxxxxxx and 456xxxxxxxxxxxxx and
1000 coins with the address 123xxxxxxxxxxxxx 0 coin with the address 456xxxxxxxxxxxxxx
then I can't withdraw from the address 456xxxxxxxxxx even 1 coin ?
If 123xxxxxxxxxxxxx and 456xxxxxxxxxxxxx are ACCOUNTS, then you are correct. Addresses are independent to accounts, and there isn't a 1:1 correlation between them; you can assign multiple addresses to a single account. Are you in the process of setting up an exchange ?
Yes I am can you help? A word of advice for setting up an exchange; accounts in bitcoind don't scale up that well, and it will be both faster and more secure if you use a database to keep track of balances and just use bitcoind for transferring coins into or out of your exchange.
|
|
|
|
beijing2008 (OP)
Jr. Member
Offline
Activity: 36
Merit: 10
|
|
July 04, 2014, 08:08:29 AM |
|
how can I keep the relationships between Bitcoind and Database of the website ?
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
July 06, 2014, 03:59:18 PM |
|
how can I keep the relationships between Bitcoind and Database of the website ?
That is a very open ended question. It depends on what you are trying to accomplish.
|
|
|
|
|