Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [2/10/2014 6:31:59 PM] Jude Austin: Hello.
- [2/10/2014 6:33:18 PM] Jim C: did we get him?
- [2/10/2014 6:33:54 PM] Jude Austin: I think so, I dunno, lol.
- [2/10/2014 6:34:30 PM] C-CEX.com: Hello!
- [2/10/2014 6:35:15 PM] C-CEX.com: I learned much before I programmed exchange logic to handle transactions, but now I am very confused
- [2/10/2014 6:35:17 PM] Jude Austin: One question, I saw you were sending funds from the main account.
- [2/10/2014 6:35:24 PM] Jude Austin: Where were those funds going?
- [2/10/2014 6:35:37 PM] Jude Austin: Were those user withdraws?
- [2/10/2014 6:35:41 PM | Edited 6:35:48 PM] C-CEX.com: Not me - funds were sent by user
- [2/10/2014 6:36:35 PM] Jude Austin: So that was your system sending out a withdraw to a user withdraw address?
- [2/10/2014 6:38:18 PM] C-CEX.com: Ok. by that TID I have 3 records:
- 1. "account":"595","address":"5n8f514kWKjx1MoudnWCbn5H8dad7gabjT","category":"receive","amount":19968.63408800
- 2. "account":"","address":"5ZP2jbJi5T2QhqZw9fLrV9uiqS3ndqzp76","category":"send","amount":-5031.36491200
- 3. "account":"","address":"5n8f514kWKjx1MoudnWCbn5H8dad7gabjT","category":"send","amount":-19968.63408800
- [2/10/2014 6:38:48 PM] C-CEX.com: "Send" initiated when user makes withdraw. I have no idea why there is 2 "send" with same TID
- [2/10/2014 6:39:23 PM] C-CEX.com: I count transaction is unique by TID - now I see i am terribly wrong, and trying to understand what have I missed
- [2/10/2014 6:39:35 PM] C-CEX.com: I never had this problem before with BTC or LTC
- [2/10/2014 6:39:39 PM] Jude Austin: When a user withdraws your back end should be using: Teslacoind sendfrom "595" <withdraw address> <amount>
- [2/10/2014 6:39:51 PM] Jude Austin: Not from your main account.
- [2/10/2014 6:40:55 PM] C-CEX.com: I have to use main account because I have a mechanism to move funds between users using codes (not making any transaction by wallets)
- [2/10/2014 6:41:07 PM] Jude Austin: That's your entire problem.
- [2/10/2014 6:41:24 PM] Jude Austin: You should be moving funds from account to account by using the RPC commands.
- [2/10/2014 6:41:34 PM] Jude Austin: move "userid1" "userid2" <amount>
- [2/10/2014 6:41:52 PM] C-CEX.com: move "account1" "account2" <amount> You mean?
- [2/10/2014 6:42:04 PM] Jude Austin: Either way, doesn't matter.
- [2/10/2014 6:42:38 PM] Jude Austin: If you check your wallet, I bet you: 2. "account":"","address":"5ZP2jbJi5T2QhqZw9fLrV9uiqS3ndqzp76","category":"send","amount":-5031.36491200
- [2/10/2014 6:42:45 PM] Jude Austin: I bet that address is one of your own.
- [2/10/2014 6:42:52 PM | Edited 6:43:01 PM] C-CEX.com: So if I use "sendfrom" then there will be always only 1 record with 1 TID?
- [2/10/2014 6:43:17 PM] C-CEX.com: wait
- [2/10/2014 6:43:44 PM] C-CEX.com: getaccount "5ZP2jbJi5T2QhqZw9fLrV9uiqS3ndqzp76" > {"result":"","error":null,"id":null}
- [2/10/2014 6:43:45 PM] C-CEX.com: nope
- [2/10/2014 6:44:03 PM] Jude Austin: Do getreceivedbyaddress 5ZP2jbJi5T2QhqZw9fLrV9uiqS3ndqzp76
- [2/10/2014 6:44:24 PM] C-CEX.com: {"result":0.00000000,"error":null,"id":null}
- [2/10/2014 6:45:07 PM] C-CEX.com: [Monday, February 10, 2014 6:38 PM] C-CEX.com:
- <<< 5n8f514kWKjx1MoudnWCbn5H8dad7gabjTthis is the same address
- [2/10/2014 6:45:24 PM] C-CEX.com: I mean an address registered for my user
- [2/10/2014 6:46:18 PM] Jude Austin: When your user signs up, does the backend do this: getaccountaddress "newuserid" ?
- [2/10/2014 6:46:41 PM] Jude Austin: This should create an account in your client and give it an address to which the user deposits to,.
- [2/10/2014 6:47:32 PM] C-CEX.com: no. When user want's to use it it goes and click "get new addres" - then it makes getnewaddress "accountid"
- [2/10/2014 6:51:11 PM] Jude Austin: Same thing pretty much.
- [2/10/2014 6:51:59 PM] Jude Austin: Do a listtransactions "userid" on one that you are questioning.
- [2/10/2014 6:52:44 PM] Jude Austin: Do it on account 595.
- [2/10/2014 6:52:58 PM] C-CEX.com: "account":"595","address":"5n8f514kWKjx1MoudnWCbn5H8dad7gabjT","category":"receive","amount":19968.63408800
- [2/10/2014 6:53:00 PM] C-CEX.com: only 1
- [2/10/2014 6:53:09 PM] C-CEX.com: If I understand everything right, if I will use "sendfrom" - then I will not get this problem?
- [2/10/2014 6:53:50 PM] Jude Austin: I believe so, this also insures that the max amount of coins they can withdraw is what is in their account balance.
- [2/10/2014 6:54:30 PM] Jude Austin: If you would have used sendfrom, there would be two transactions in that output.
- [2/10/2014 6:55:00 PM] Jim C: and this is a matching amount from one of the previous transactions in question
- [2/10/2014 6:55:00 PM] Jude Austin: How are you displaying peoples transactions on a personal level, parsing the main account with listtransactions?
- [2/10/2014 6:55:10 PM] C-CEX.com: yes.
- [2/10/2014 6:55:15 PM] Jude Austin: Yuck, lol.
- [2/10/2014 6:55:19 PM] C-CEX.com: listtransactions "account"
- [2/10/2014 6:55:23 PM] C-CEX.com: not the main account
- [2/10/2014 6:55:25 PM] Jude Austin: Oh ok,.
- [2/10/2014 6:55:37 PM] C-CEX.com: that would be mess :)
- [2/10/2014 6:56:15 PM] C-CEX.com: I wonder why don't i have such a problem with LTC, BTC and other currencies?
- [2/10/2014 6:56:24 PM] C-CEX.com: what is the difference in TES from others?
- [2/10/2014 6:56:50 PM] Jude Austin: Because the code is different.
- [2/10/2014 6:57:45 PM] Jude Austin: I am trying to figure out what the second transaction is, theone for -5031.36491200
- [2/10/2014 7:02:30 PM] C-CEX.com: yes - I want to know it too
- [2/10/2014 7:03:28 PM] Jude Austin: This would be much easier with a block explorer, lol.
- [2/10/2014 7:04:39 PM] Jude Austin: Can you search your database for the user that has the withdraw address of 5ZP2jbJi5T2QhqZw9fLrV9uiqS3ndqzp76
- [2/10/2014 7:04:49 PM] Jude Austin: Or are they not stored?
- [2/10/2014 7:05:08 PM] C-CEX.com: yes. 1 minute
- [2/10/2014 7:05:35 PM] C-CEX.com: I found that user
- [2/10/2014 7:06:10 PM] Jude Austin: Ok now to a listtransactions for that user id.
- [2/10/2014 7:06:13 PM] Jude Austin: do*
- [2/10/2014 7:06:38 PM] C-CEX.com: {"result":[],"error":null,"id":null}
- [2/10/2014 7:06:55 PM] C-CEX.com: he bought TES for BTC
- [2/10/2014 7:07:03 PM] C-CEX.com: and did only withdrawals
- [2/10/2014 7:07:34 PM] Jude Austin: So when he bought TES instead of it being moved to his account from the main account first it just went straight to his withdraw address?
- [2/10/2014 7:08:00 PM] C-CEX.com: I do not move funds between accounts. I just store an amount that belongs to each user.
- [2/10/2014 7:08:06 PM] Jude Austin: Not smart.
- [2/10/2014 7:08:13 PM] Jude Austin: For reasons like this.
- [2/10/2014 7:08:25 PM] C-CEX.com: yes, I can see it now
- [2/10/2014 7:08:43 PM] Jude Austin: https://en.bitcoin.it/wiki/Accounts_explained
- [2/10/2014 7:08:48 PM] Jude Austin: The very bottom of the page.
- [2/10/2014 7:08:56 PM] Jude Austin: Will be very helpful and save you a lot of headaches.
- [2/10/2014 7:11:29 PM] C-CEX.com: Ok. So can You please explain me more detailed why there is 3 records with the same TID ?
- [2/10/2014 7:14:41 PM] Jude Austin: https://en.bitcoin.it/wiki/Transactions
- [2/10/2014 7:14:41 PM] Jude Austin: lol
- [2/10/2014 7:15:36 PM] Jude Austin: There can be more than one output, and they share the combined value of the inputs.
- [2/10/2014 7:17:23 PM] Jim C: so we are good now? I have to move on.....C-CEX....will you be able to move forward?
- [2/10/2014 7:20:06 PM] C-CEX.com: Thanks a lot. You made me feel like noob. Thank You :)
- [2/10/2014 7:20:27 PM] Jude Austin: No problem, this shit is confusing.
- [2/10/2014 7:20:38 PM] Jude Austin: If you are feeling generous: 154K8jewSTKhJDJMgqWvKG2jMd1eeMpFSQ
- [2/10/2014 7:20:39 PM] Jude Austin: lol
- [2/10/2014 7:21:12 PM] Jude Austin: Just remember never send funds from your main account, always move them to the account intended, then sendfrom that account to the withdraw address.
- [2/10/2014 7:21:17 PM] Jude Austin: It will be much easier to track.
- [2/10/2014 7:21:54 PM] C-CEX.com: and much slower to work
- [2/10/2014 7:22:09 PM] C-CEX.com: when trades goes at the speed of 100/sec I don't know how it will work
- [2/10/2014 7:22:43 PM] Jude Austin: Are you using walletnotify?
- [2/10/2014 7:22:48 PM] C-CEX.com: Do You think big exchanges do exactly as You say? Moving sending commands to wallets each time somebody buy 0.0001 btc ?
- [2/10/2014 7:23:45 PM] C-CEX.com: not yet, I am not sure if i need this. I just do listtransactions "acount" every several minutes
- [2/10/2014 7:24:13 PM] Jude Austin: You should use walletnotify, it will execute a command every time a transaction happens on the client.
- [2/10/2014 7:24:51 PM] C-CEX.com: Thanks for advises. You helped a lot.
- [2/10/2014 7:25:11 PM] Jim C: thanks Jude
- [2/10/2014 7:25:15 PM] Jude Austin: No problem guys!
- [2/10/2014 7:25:21 PM] C-CEX.com: Jude :) not really :)
- [2/10/2014 7:25:26 PM] C-CEX.com: I'm Ukrainian
- [2/10/2014 7:25:36 PM] Jude Austin: haha
- [2/10/2014 7:25:48 PM] Jim C: C-CEX....you now have my skype if needed
- [2/10/2014 7:25:55 PM] Jim C: for future.....
- [2/10/2014 7:25:56 PM] C-CEX.com: Thanks again!
- [2/11/2014 4:58:37 AM | Edited 4:58:43 AM] C-CEX.com: Reworked withdraw logic to use sendfrom. I hope that will not happen again. Thank You!
- [2/11/2014 4:27:35 PM] C-CEX.com: Hello! May I have Your attantion for 1 minute?
- [2/11/2014 4:27:47 PM] Jude Austin: Sure.
- [2/11/2014 4:28:38 PM] C-CEX.com: By this issues people withdrawn more than they had. And i am missing 66975 TES. May I buy it from You for some adequate price?
- [2/11/2014 4:31:06 PM] Jim C: yea...thats no problem....
- [2/11/2014 4:31:12 PM] C-CEX.com: 5T6RHhXH8C6J21SCfwm9RscFBDxk8d6Q2w
- [2/11/2014 4:31:34 PM] C-CEX.com: here is my wallet. Tell me what and how much You need me to transfer
- [2/11/2014 4:44:53 PM] C-CEX.com: [Tuesday, February 11, 2014 4:41 PM] C-CEX.com:
- <<< Is it enough using sendfrom istead of sendtoaddress to avoid such a problems in future?
- [2/11/2014 4:45:26 PM] C-CEX.com: And Thank You for help
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement