Skip to content

Commit

Permalink
Adding comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Jan 31, 2019
1 parent f92a768 commit 8359ea9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions miner/src/surf/SurfMiner.java
Expand Up @@ -468,18 +468,21 @@ private void submitWork(WorkUnit wu, byte[] nonce, byte[] expected_hash) throws
}


/**
* Should match up with exactly what writeRecord() writes and processBuffer expects
*/
private int getRecordSize()
{
return 4+1+8+12+32;
}

private void writeRecord(ByteBuffer bb, int work_id, byte pass, long word_idx, byte[] nonce, byte[] context)
{
bb.putInt(work_id);
bb.put(pass);
bb.putLong(word_idx);
bb.put(nonce);
bb.put(context);
bb.putInt(work_id); //4 bytes
bb.put(pass); //1 byte
bb.putLong(word_idx);//8 bytes
bb.put(nonce); //12 bytes
bb.put(context); //32 bytes
}

private void processBuffer(byte[] block_data, int block_number, ByteBuffer b, Semaphore work_sem)
Expand Down

0 comments on commit 8359ea9

Please sign in to comment.