Bitcoin Forum
September 27, 2016, 03:36:30 AM *
News: Latest stable version of Bitcoin Core: 0.13.0 (New!) [Torrent]. Make sure you verify it.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Performance Counter Patch and RPC extensions  (Read 1689 times)
lachesis
Full Member
***
Offline Offline

Activity: 210


View Profile
June 07, 2010, 04:05:18 PM
 #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
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
lachesis
Full Member
***
Offline Offline

Activity: 210


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


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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!