Bitcoin Forum
May 10, 2024, 08:33:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: svn rev 181, 182 and 183  (Read 1128 times)
Gavin Andresen (OP)
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
November 18, 2010, 12:24:45 AM
 #1

It'd been a while since I shot myself in my foot, so I guess I was overdue.

Anyhow, on my third attempt I think I've got it right-- I fixed a bug that was causing Bitcoin to be unusably slow on Macs running FileVault (the built-in filesystem encryption on the Mac).

The problem was Bitcoin opening and then closing the debug.log file on every write.  After a couple of "too clever for my own good" solutions that broke, or could break, in interesting ways, the code now opens debug.log and simply keeps it open, constantly appending to it.

If you run a bitcoind server, see the "don't forget to rotate your logs" thread for what you need to do for log rotation to work properly.

How often do you get the chance to work on a potentially world-changing project?
1715373228
Hero Member
*
Offline Offline

Posts: 1715373228

View Profile Personal Message (Offline)

Ignore
1715373228
Reply with quote  #2

1715373228
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715373228
Hero Member
*
Offline Offline

Posts: 1715373228

View Profile Personal Message (Offline)

Ignore
1715373228
Reply with quote  #2

1715373228
Report to moderator
wumpus
Hero Member
*****
qt
Offline Offline

Activity: 812
Merit: 1022

No Maps for These Territories


View Profile
November 18, 2010, 08:11:46 AM
 #2

The problem was Bitcoin opening and then closing the debug.log file on every write.  After a couple of "too clever for my own good" solutions that broke, or could break, in interesting ways, the code now opens debug.log and simply keeps it open, constantly appending to it.
Indeed, fflush is good enough to make sure the data gets written, constantly reopening/closing the file won't do anything beyond that.

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
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!