Bitcoin Forum
June 16, 2024, 08:33:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [PATCH] modularize BitcoinMiner a bit (code movement)  (Read 1562 times)
jgarzik (OP)
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
November 21, 2010, 09:21:12 AM
 #1

URL: http://yyz.us/bitcoin/patch.bitcoin-modularize_miner

This patch is similar to patches sometimes seen in the Linux kernel.  Analogous to an algebraic reduction, or a step in a mathematic proof, this patch intentionally makes zero functional code changes.  It moves two chunks of code -- hash meter and check-solution -- from the BitcoinMiner() function into separate functions.

This change makes it easier to integrate remote mining.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Cdecker
Hero Member
*****
Offline Offline

Activity: 489
Merit: 504



View Profile WWW
November 21, 2010, 04:36:07 PM
 #2

Seems to be ok: +1

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
jgarzik (OP)
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
November 21, 2010, 09:43:21 PM
 #3

Patch updated to move prepare-work and prepare-hash-buffer code into separate functions.

Again, no code changes, just code movement.

The patch now looks similar to m0mchil's getwork patch, and makes integrating remote mining much easier.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
jgarzik (OP)
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
November 22, 2010, 09:13:53 AM
 #4

Patch updated to fix silly parameter passing bug in one of the new functions.  Code now generates correct blocks on testnet, as expected.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
jgarzik (OP)
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
November 23, 2010, 12:04:40 AM
 #5

Updated to SVN r188 (accounts).

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
jgarzik (OP)
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
November 23, 2010, 10:46:32 PM
 #6

This patch is entirely superceded by SVN r189, satoshi's version of getwork.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
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!