I'd like to be whitelisted so that I can post this in an appropriate location. This is a repost. I have a couple of real problems here, and can't do anything about it as a 'noob.' I'm obviously not spamming, and I am not asking for anyone to send me BTC, so I can't be a scammer...
I'm having 2 problems with bitcoind.
It always creates 2 new addresses when I ask it to make 1. The PHP code is super simple.
<?php
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://username:password@127.0.0.1:8332/');
echo "Connection Count: ";
print_r($bitcoin->getconnectioncount());
echo "<hr>";
echo "Block Count: ";
print_r($bitcoin->getblockcount());
echo "<hr>";
echo "<a href=getnewaddress.html>Get New Address</a>";
echo "<hr>";
echo "Balance: ";
print_r($bitcoin->getbalance());
echo "<hr>";
echo "Addresses: <br>";
$addresses = ($bitcoin->getaddressesbyaccount(""));
$n = 1;
foreach ($addresses as $v) {
echo "<a href=http://blockchain.info/address/$v target=_new>$v</a> - $n<br>";
$n = $n +1;
}
unset($v);
unset($n);
unset($addresses);
unset($bitcoin);
?>
<?php
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://username:password@127.0.0.1:8332/');
print_r($bitcoin->getnewaddress(""));
unset($bitcoin);
?>
<meta http-equiv=refresh content=0;test.html>
It shows me 1 new address, but when I come back to the test.html, 2 new ones have been created.
I can work around this by preculding the command with a foreach that iterates the existing addresses and checks for any BTC sent to it, as soon as it hits one with 0, it breaks out and shows that as the new address instead of running the getnewaddress command. If everything has BTC sent to it, then it proceeds to make a new one, making 2, and we rinse and repeat...
But I really shouldn't have to and it seems no one else is having this problem...
Second problem is that bitcoind insists on filling the drive up with 9.6M binary files called "log.00000XXXX." It never stops writing this crap to the drive. And since the file isn't human readable, I have no idea what's wrong. They are in the /var/lib/bitcoin/.bitcon/database/ directory. The continuous drive I/O sometimes makes the machine unusable and jsonRPCClient actions fail. Once bitcoind loads up, the machine is virtually unusable. It's just burning up the drive stuffing it full of 9.6M jibberish files for no reason.
total 42M
drwx------ 2 bitcoin bitcoin 208 Sep 13 17:45 .
drwxr-xr-x 4 bitcoin bitcoin 512 Sep 12 21:22 ..
-rw------- 1 bitcoin bitcoin 9.6M Sep 13 16:54 log.0000000433
-rw------- 1 bitcoin bitcoin 9.6M Sep 13 17:11 log.0000000434
-rw------- 1 bitcoin bitcoin 9.6M Sep 13 17:27 log.0000000435
-rw------- 1 bitcoin bitcoin 9.6M Sep 13 17:45 log.0000000436
-rw------- 1 bitcoin bitcoin 9.6M Sep 13 17:50 log.0000000437
It'll just keep making more until the drive fills up...
I'd like to post this in an appropriate location...
UPDATE:
Switched to ~amd64 on the bitcoind package, deleted entire /var/lib/bitcoin/.bitcoin directory, emerged 0.7, everything works fine now.