Bitcoin Forum
April 30, 2024, 03:31:25 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Performance Counter Patch and RPC extensions  (Read 10023 times)
lachesis (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 104


View Profile
June 07, 2010, 04:05:18 PM
Last edit: August 04, 2010, 06:39:09 PM by lachesis
 #1

After an IRC session, I modified laszlo's bitcoin performance patch to be slightly faster and cleaner. I also added two rpc calls: listgenerated which just lists the strings from the UI of any generated blocks (nice for headless bitcoin mining servers) and gethps which returns the performance count in RPC. I also added gethps to the end of getinfo. Finally, I fixed GCC's issue with optimizations and htons in net.h.

I've mentioned all of these patches elsewhere, but laszlo suggested that I compile them into one patch and post it. Here's that patch:
http://www.alloscomp.com/bitcoin/bitcoin-svn-80-combined-2010-06-07.patch
http://www.alloscomp.com/bitcoin/bitcoin-svn-81-combined-2010-06-11.patch
^ Updated for r81.
Check out http://www.alloscomp.com/bitcoin. The latest version is there.

Enjoy!

Bitcoin Calculator | Scallion | GPG Key | WoT Rating | 1QGacAtYA7E8V3BAiM7sgvLg7PZHk5WnYc
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714491085
Hero Member
*
Offline Offline

Posts: 1714491085

View Profile Personal Message (Offline)

Ignore
1714491085
Reply with quote  #2

1714491085
Report to moderator
1714491085
Hero Member
*
Offline Offline

Posts: 1714491085

View Profile Personal Message (Offline)

Ignore
1714491085
Reply with quote  #2

1714491085
Report to moderator
lachesis (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 104


View Profile
June 10, 2010, 02:34:57 PM
 #2

Here's a little python program I wrote that checks to see if you have a bitcoin balance and, if so, sends it to a stored address. I use it with a cron job on my headless Bitcoin generating box to keep my main wallet fed with coins.

Code:
#!/usr/bin/python
import subprocess,sys
MyBCAddress = 'PUT YOUR BITCOIN ADDRESS HERE'

p = subprocess.Popen(['bitcoin','getbalance'],stdout=subprocess.PIPE)
out,err = p.communicate()

out = out.strip()

try:
    bal = float(out)
except ValueError:
    sys.exit(1)

if bal > 0.01:
    print "We have a balance of {0:.2f}BC. Sending...".format(bal)
    p = subprocess.Popen(['bitcoin','sendtoaddress',MyBCAddress,str(bal)],stdout=subprocess.PIPE)
    out,err = p.communicate()
    print out
else:
    print "No coins here."

Bitcoin Calculator | Scallion | GPG Key | WoT Rating | 1QGacAtYA7E8V3BAiM7sgvLg7PZHk5WnYc
llama
Member
**
Offline Offline

Activity: 103
Merit: 61


View Profile
August 04, 2010, 12:21:38 AM
 #3

Nice work Wink  You don't love it till you miss it.

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!