Bitcoin Forum

Economy => Services => Topic started by: BitcoinINV on February 28, 2013, 03:21:19 PM



Title: Need a Programmer
Post by: BitcoinINV on February 28, 2013, 03:21:19 PM
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!


Title: Re: Need a Programmer
Post by: ironcross360 on February 28, 2013, 03:23:33 PM
How much are you paying>


Title: Re: Need a Programmer
Post by: greyhawk on February 28, 2013, 03:33:23 PM
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.


Title: Re: Need a Programmer
Post by: BitcoinINV on February 28, 2013, 03:33:43 PM
How much are you paying>
What background do you have? Can I see some examples of work you have completed or some references please.


Title: Re: Need a Programmer
Post by: BitcoinINV on February 28, 2013, 03:34:23 PM
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.


Title: Re: Need a Programmer
Post by: BitcoinINV on February 28, 2013, 05:15:19 PM
seems to be a no go on that. Now it just reads and spits out the same amount each minute lol.


Title: Re: Need a Programmer
Post by: greyhawk on February 28, 2013, 05:43:23 PM
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.


Title: Re: Need a Programmer
Post by: adamstgBit on February 28, 2013, 08:23:35 PM
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?


Title: Re: Need a Programmer
Post by: BitcoinINV on February 28, 2013, 09:31:03 PM
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.


Title: Re: Need a Programmer
Post by: codro on March 01, 2013, 02:25:16 PM
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.


Title: Re: Need a Programmer
Post by: BitcoinINV on March 01, 2013, 03:40:13 PM
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.