Bitcoin Forum
April 27, 2024, 09:03:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need a Programmer  (Read 956 times)
BitcoinINV (OP)
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
February 28, 2013, 03:21:19 PM
 #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!

In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
ironcross360
Full Member
***
Offline Offline

Activity: 140
Merit: 100


Troll of the Fourth Reich.


View Profile
February 28, 2013, 03:23:33 PM
 #2

How much are you paying>

Why are you just staring at this? Just send it! 1MHZjADM41ttjbPUiTPYWGYGm45XLf8ZeS
greyhawk
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1009


View Profile
February 28, 2013, 03:33:23 PM
 #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.
BitcoinINV (OP)
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
February 28, 2013, 03:33:43 PM
 #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.

BitcoinINV (OP)
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
February 28, 2013, 03:34:23 PM
 #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.

BitcoinINV (OP)
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
February 28, 2013, 05:15:19 PM
Last edit: February 28, 2013, 05:32:34 PM by BitcoinINV
 #6

seems to be a no go on that. Now it just reads and spits out the same amount each minute lol.

greyhawk
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1009


View Profile
February 28, 2013, 05: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.
adamstgBit
Legendary
*
Offline Offline

Activity: 1904
Merit: 1037


Trusted Bitcoiner


View Profile WWW
February 28, 2013, 08: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?

BitcoinINV (OP)
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
February 28, 2013, 09: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.

codro
Member
**
Offline Offline

Activity: 91
Merit: 10


View Profile
March 01, 2013, 02:25:16 PM
 #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.
BitcoinINV (OP)
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
March 01, 2013, 03:40:13 PM
 #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.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!