Author

Topic: Need a Programmer (Read 964 times)

sr. member
Activity: 448
Merit: 250
March 01, 2013, 10:40:13 AM
#11
Based on what you're describing, the problem is not in this piece of code.

When you're withdrawing, you should record the withdraw in the database somewhere by subtracting it from "final amount" stored in the database. So that the final amount/balance is always accurate to what is in the blockchain.

Ill see what I can do.
member
Activity: 91
Merit: 10
March 01, 2013, 09:25:16 AM
#10
Based on what you're describing, the problem is not in this piece of code.

When you're withdrawing, you should record the withdraw in the database somewhere by subtracting it from "final amount" stored in the database. So that the final amount/balance is always accurate to what is in the blockchain.
sr. member
Activity: 448
Merit: 250
February 28, 2013, 04:31:03 PM
#9
what lang is this? looks like VB

the <= appears to be what you want given the logic you described

what is the problem you are seeing with the current code, if you send more coin to the wallet Address A it doesn't update anything?

and what are you trying to do exactly? keep the balance up to date?

why wouldn't you simply always use the new_final_amount as the current balance?

It updates in my system fine, and thats all I want it to do. But what happens is if you deposit 5 bitcoins into one of the bulk wallet addresses then I withdraw it. The next deposit will not show up untill you deposit 5 bitcoins and thing it will only show the amount after that. I have to assume this would go on forever.
legendary
Activity: 1904
Merit: 1037
Trusted Bitcoiner
February 28, 2013, 03:23:35 PM
#8
what lang is this? looks like VB

the <= appears to be what you want given the logic you described

what is the problem you are seeing with the current code, if you send more coin to the wallet Address A it doesn't update anything?

and what are you trying to do exactly? keep the balance up to date?

why wouldn't you simply always use the new_final_amount as the current balance?
hero member
Activity: 952
Merit: 1009
February 28, 2013, 12:43:23 PM
#7
Huh, interesting.

EDIT: Oh, waiiiit. Now I see what he's trying to do. This thing runs on a schedule, does it?

try reinserting the lines, but change them to this (getting rid of the lower than operator):

if new_final_amount = old_final_amount:
                  continue

That basically says if there's no change in amounts, jump out of the loop, otherwise continue and update.

If that doesn't work I'm out of ideas.
sr. member
Activity: 448
Merit: 250
February 28, 2013, 12:15:19 PM
#6
seems to be a no go on that. Now it just reads and spits out the same amount each minute lol.
sr. member
Activity: 448
Merit: 250
February 28, 2013, 10:34:23 AM
#5
Here's your problem right there:

if new_final_amount <= old_final_amount:
                  continue


If the current amount is less then the old amount, then the "continue" is executed ending the current loop.

Delete those two lines and you should be good.
Thank you greyhawk if it works Ill send a tip your way.
sr. member
Activity: 448
Merit: 250
February 28, 2013, 10:33:43 AM
#4
How much are you paying>
What background do you have? Can I see some examples of work you have completed or some references please.
hero member
Activity: 952
Merit: 1009
February 28, 2013, 10:33:23 AM
#3
Here's your problem right there:

if new_final_amount <= old_final_amount:
                  continue


If the current amount is less then the old amount, then the "continue" is executed ending the current loop.

Delete those two lines and you should be good.
full member
Activity: 140
Merit: 100
Troll of the Fourth Reich.
February 28, 2013, 10:23:33 AM
#2
How much are you paying>
sr. member
Activity: 448
Merit: 250
February 28, 2013, 10:21:19 AM
#1
I need someone to help me figure this out, my programmer had a family emergency and I have minimal skills.
What is happening is when the script calls the addy if the balance is lower then the last call it will not add the coins untill it adds up past the fist amounts. Bulk wallet has address A  address A is sent 5 coins 3 are withdraw from the the bulk wallet that pulls them from the address. In order for the address to show a new deposit it has to be higher then the last.

print("Checking member ["+str(member_id)+"] Bit Coin final amount for updates...")
               bitcoin_address = bitcoin_db_class.BitCoinDB.member_address_list[member_id]["address"]
               old_final_amount = bitcoin_db_class.BitCoinDB.member_address_list[member_id]["final_amount"]
               new_final_amount = Decimal(blockchain_api.BlockChainAPI.GetFinalAmount(bitcoin_address))
               if new_final_amount <= old_final_amount:
                  continue
               print("New amount["+str(new_final_amount)+"] found...Updating database...")
               bitcoin_db_class.BitCoinDB.AddMemberFinalAmount(member_id, new_final_amount)
               bitcoin_db_class.BitCoinDB.member_address_list[member_id]["final_amount"] = new_final_amount
         time_now = time.clock()
         run_once = True
      UpdateMembersBitCoinFinalAmountThread.going = False


Of course I am willing to pay for help!
Jump to: