Bitcoin Forum
June 29, 2024, 12:49:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bash-script for users with dynamic IP to restart bitcoin  (Read 1708 times)
molecular (OP)
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
March 07, 2011, 01:50:51 PM
 #1

I wrote a little bash a while back, because I'm on a dynamic ip connection and bitcoin doesn't behave so nicely with changing IPs. (see https://github.com/bitcoin/bitcoin/issues#issue/48 for more info (while the gui still displays connections, the node may in fact be disconnected)).
Since I still wanted to mine solo, I wrote this script.

I've been using it for 6 weeks now, have been mining solo using it for 2 weeks now without problem and I thought it's ripe for sharing:

http://pastebin.com/tFJwFwns

It works by comparing an "official blockcount" (e.g. from blockexplorer.com) with the local one from rpc interface.

To use it, you should check/edit some variables at the beginning of the script: BITCOIN_BIN, PING_HOST and OFFICIAL_URL
Then just go ahead and run it.
If you want, you can also adjust some timing variables.

Feedback is welcome, also symbolic (0.01 BTC or so) donations to the address in my signature are of course appreciated and also good for your karma Wink

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
DarkMatter
Member
**
Offline Offline

Activity: 67
Merit: 10


Stop trying to steal my account, thanks.


View Profile
March 09, 2011, 01:36:24 PM
 #2

The post is old, and I've not seen this issue since a quite long time.
Guess it has been fixed in most recent client releases.
Lardie
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
March 11, 2011, 07:28:09 PM
 #3

Yesterday I was disconnected from the internet for a couple of hours and the Bitcoin gui still showed 15 connections and my miner was still buzzing away.  Huh
DarkMatter
Member
**
Offline Offline

Activity: 67
Merit: 10


Stop trying to steal my account, thanks.


View Profile
March 14, 2011, 06:16:53 PM
 #4

The post is old, and I've not seen this issue since a quite long time.
Guess it has been fixed in most recent client releases.

Ehm, I forgot to give you the deserved credit for the script, looks very nice Smiley
snedie
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
March 14, 2011, 11:59:43 PM
 #5

Yesterday I was disconnected from the internet for a couple of hours and the Bitcoin gui still showed 15 connections and my miner was still buzzing away.  Huh

Well the miner will simply continue to process the current work it has been given until it either finishes it or is told to stop.
molecular (OP)
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
March 16, 2011, 01:10:01 PM
 #6

The post is old, and I've not seen this issue since a quite long time.
Guess it has been fixed in most recent client releases.

Ehm, I forgot to give you the deserved credit for the script, looks very nice Smiley

Thanks!

And: the issue (https://github.com/bitcoin/bitcoin/issues#issue/48) is not solved. There's new comments now.

BlueMatt looked into it and we chatted a bit yesterday on #bitcoin-dev. It seems it will need some serious debugging. I'm trying to help him as much as I can (testing).

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
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!