Advertisement
JudeAustin

c-cex.com el oh el

Mar 20th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.77 KB | None | 0 0
  1. [2/10/2014 6:31:59 PM] Jude Austin: Hello.
  2. [2/10/2014 6:33:18 PM] Jim C: did we get him?
  3. [2/10/2014 6:33:54 PM] Jude Austin: I think so, I dunno, lol.
  4. [2/10/2014 6:34:30 PM] C-CEX.com: Hello!
  5. [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
  6. [2/10/2014 6:35:17 PM] Jude Austin: One question, I saw you were sending funds from the main account.
  7. [2/10/2014 6:35:24 PM] Jude Austin: Where were those funds going?
  8. [2/10/2014 6:35:37 PM] Jude Austin: Were those user withdraws?
  9. [2/10/2014 6:35:41 PM | Edited 6:35:48 PM] C-CEX.com: Not me - funds were sent by user
  10. [2/10/2014 6:36:35 PM] Jude Austin: So that was your system sending out a withdraw to a user withdraw address?
  11. [2/10/2014 6:38:18 PM] C-CEX.com: Ok. by that TID I have 3 records:
  12. 1. "account":"595","address":"5n8f514kWKjx1MoudnWCbn5H8dad7gabjT","category":"receive","amount":19968.63408800
  13. 2. "account":"","address":"5ZP2jbJi5T2QhqZw9fLrV9uiqS3ndqzp76","category":"send","amount":-5031.36491200
  14. 3. "account":"","address":"5n8f514kWKjx1MoudnWCbn5H8dad7gabjT","category":"send","amount":-19968.63408800
  15. [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
  16. [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
  17. [2/10/2014 6:39:35 PM] C-CEX.com: I never had this problem before with BTC or LTC
  18. [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>
  19. [2/10/2014 6:39:51 PM] Jude Austin: Not from your main account.
  20. [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)
  21. [2/10/2014 6:41:07 PM] Jude Austin: That's your entire problem.
  22. [2/10/2014 6:41:24 PM] Jude Austin: You should be moving funds from account to account by using the RPC commands.
  23. [2/10/2014 6:41:34 PM] Jude Austin: move "userid1" "userid2" <amount>
  24. [2/10/2014 6:41:52 PM] C-CEX.com: move "account1" "account2" <amount> You mean?
  25. [2/10/2014 6:42:04 PM] Jude Austin: Either way, doesn't matter.
  26. [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
  27. [2/10/2014 6:42:45 PM] Jude Austin: I bet that address is one of your own.
  28. [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?
  29. [2/10/2014 6:43:17 PM] C-CEX.com: wait
  30. [2/10/2014 6:43:44 PM] C-CEX.com: getaccount "5ZP2jbJi5T2QhqZw9fLrV9uiqS3ndqzp76" > {"result":"","error":null,"id":null}
  31. [2/10/2014 6:43:45 PM] C-CEX.com: nope
  32. [2/10/2014 6:44:03 PM] Jude Austin: Do getreceivedbyaddress 5ZP2jbJi5T2QhqZw9fLrV9uiqS3ndqzp76
  33. [2/10/2014 6:44:24 PM] C-CEX.com: {"result":0.00000000,"error":null,"id":null}
  34. [2/10/2014 6:45:07 PM] C-CEX.com: [Monday, February 10, 2014 6:38 PM] C-CEX.com:
  35.  
  36. <<< 5n8f514kWKjx1MoudnWCbn5H8dad7gabjTthis is the same address
  37. [2/10/2014 6:45:24 PM] C-CEX.com: I mean an address registered for my user
  38. [2/10/2014 6:46:18 PM] Jude Austin: When your user signs up, does the backend do this: getaccountaddress "newuserid" ?
  39. [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,.
  40. [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"
  41. [2/10/2014 6:51:11 PM] Jude Austin: Same thing pretty much.
  42. [2/10/2014 6:51:59 PM] Jude Austin: Do a listtransactions "userid" on one that you are questioning.
  43. [2/10/2014 6:52:44 PM] Jude Austin: Do it on account 595.
  44. [2/10/2014 6:52:58 PM] C-CEX.com: "account":"595","address":"5n8f514kWKjx1MoudnWCbn5H8dad7gabjT","category":"receive","amount":19968.63408800
  45. [2/10/2014 6:53:00 PM] C-CEX.com: only 1
  46. [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?
  47. [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.
  48. [2/10/2014 6:54:30 PM] Jude Austin: If you would have used sendfrom, there would be two transactions in that output.
  49. [2/10/2014 6:55:00 PM] Jim C: and this is a matching amount from one of the previous transactions in question
  50. [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?
  51. [2/10/2014 6:55:10 PM] C-CEX.com: yes.
  52. [2/10/2014 6:55:15 PM] Jude Austin: Yuck, lol.
  53. [2/10/2014 6:55:19 PM] C-CEX.com: listtransactions "account"
  54. [2/10/2014 6:55:23 PM] C-CEX.com: not the main account
  55. [2/10/2014 6:55:25 PM] Jude Austin: Oh ok,.
  56. [2/10/2014 6:55:37 PM] C-CEX.com: that would be mess :)
  57. [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?
  58. [2/10/2014 6:56:24 PM] C-CEX.com: what is the difference in TES from others?
  59. [2/10/2014 6:56:50 PM] Jude Austin: Because the code is different.
  60. [2/10/2014 6:57:45 PM] Jude Austin: I am trying to figure out what the second transaction is, theone for -5031.36491200
  61. [2/10/2014 7:02:30 PM] C-CEX.com: yes - I want to know it too
  62. [2/10/2014 7:03:28 PM] Jude Austin: This would be much easier with a block explorer, lol.
  63. [2/10/2014 7:04:39 PM] Jude Austin: Can you search your database for the user that has the withdraw address of 5ZP2jbJi5T2QhqZw9fLrV9uiqS3ndqzp76
  64. [2/10/2014 7:04:49 PM] Jude Austin: Or are they not stored?
  65. [2/10/2014 7:05:08 PM] C-CEX.com: yes. 1 minute
  66. [2/10/2014 7:05:35 PM] C-CEX.com: I found that user
  67. [2/10/2014 7:06:10 PM] Jude Austin: Ok now to a listtransactions for that user id.
  68. [2/10/2014 7:06:13 PM] Jude Austin: do*
  69. [2/10/2014 7:06:38 PM] C-CEX.com: {"result":[],"error":null,"id":null}
  70. [2/10/2014 7:06:55 PM] C-CEX.com: he bought TES for BTC
  71. [2/10/2014 7:07:03 PM] C-CEX.com: and did only withdrawals
  72. [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?
  73. [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.
  74. [2/10/2014 7:08:06 PM] Jude Austin: Not smart.
  75. [2/10/2014 7:08:13 PM] Jude Austin: For reasons like this.
  76. [2/10/2014 7:08:25 PM] C-CEX.com: yes, I can see it now
  77. [2/10/2014 7:08:43 PM] Jude Austin: https://en.bitcoin.it/wiki/Accounts_explained
  78. [2/10/2014 7:08:48 PM] Jude Austin: The very bottom of the page.
  79. [2/10/2014 7:08:56 PM] Jude Austin: Will be very helpful and save you a lot of headaches.
  80. [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 ?
  81. [2/10/2014 7:14:41 PM] Jude Austin: https://en.bitcoin.it/wiki/Transactions
  82. [2/10/2014 7:14:41 PM] Jude Austin: lol
  83. [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.
  84. [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?
  85. [2/10/2014 7:20:06 PM] C-CEX.com: Thanks a lot. You made me feel like noob. Thank You :)
  86. [2/10/2014 7:20:27 PM] Jude Austin: No problem, this shit is confusing.
  87. [2/10/2014 7:20:38 PM] Jude Austin: If you are feeling generous: 154K8jewSTKhJDJMgqWvKG2jMd1eeMpFSQ
  88. [2/10/2014 7:20:39 PM] Jude Austin: lol
  89. [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.
  90. [2/10/2014 7:21:17 PM] Jude Austin: It will be much easier to track.
  91. [2/10/2014 7:21:54 PM] C-CEX.com: and much slower to work
  92. [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
  93. [2/10/2014 7:22:43 PM] Jude Austin: Are you using walletnotify?
  94. [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 ?
  95. [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
  96. [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.
  97. [2/10/2014 7:24:51 PM] C-CEX.com: Thanks for advises. You helped a lot.
  98. [2/10/2014 7:25:11 PM] Jim C: thanks Jude
  99. [2/10/2014 7:25:15 PM] Jude Austin: No problem guys!
  100. [2/10/2014 7:25:21 PM] C-CEX.com: Jude :) not really :)
  101. [2/10/2014 7:25:26 PM] C-CEX.com: I'm Ukrainian
  102. [2/10/2014 7:25:36 PM] Jude Austin: haha
  103. [2/10/2014 7:25:48 PM] Jim C: C-CEX....you now have my skype if needed
  104. [2/10/2014 7:25:55 PM] Jim C: for future.....
  105. [2/10/2014 7:25:56 PM] C-CEX.com: Thanks again!
  106. [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!
  107. [2/11/2014 4:27:35 PM] C-CEX.com: Hello! May I have Your attantion for 1 minute?
  108. [2/11/2014 4:27:47 PM] Jude Austin: Sure.
  109. [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?
  110. [2/11/2014 4:31:06 PM] Jim C: yea...thats no problem....
  111. [2/11/2014 4:31:12 PM] C-CEX.com: 5T6RHhXH8C6J21SCfwm9RscFBDxk8d6Q2w
  112. [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
  113. [2/11/2014 4:44:53 PM] C-CEX.com: [Tuesday, February 11, 2014 4:41 PM] C-CEX.com:
  114.  
  115. <<< Is it enough using sendfrom istead of sendtoaddress to avoid such a problems in future?
  116. [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