Let us consider we have n miners in our mining pool. Now the manager of the pool verified the transactions and packed into a block to be mined. Then it passed the block to all n miners in the pool.
Lets assume that out block is as below:
to_mine_block = {
Block No: 1000
Prev Block:999
timestamp: "1000-01-01 00:00:00"
Data : "XYZ"
nonce : ?
}
Now,to_mine_block is sent to all n miners. Will n miners runs the following code to
String target = new String(new char[difficulty]).replace('\0', '0');
while(!hash.substring( 0, difficulty).equals(target)) {
nonce ++;
hash = calculateHash();
}
Will all n miners run this code individually in the pool ? If so, this race will always be wined by the miners with the highest mining power. Because the one with highest mining power will move ahead in the loop than the ones with low hash power.