mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Expand reserve_size so there is a NUL byte at the end, this allows the end-pools to use a UInt32BE call at the end.
This commit is contained in:
+4
-2
@@ -69,7 +69,7 @@ function Coin(data){
|
||||
|
||||
this.getBlockTemplate = function(walletAddress, callback){
|
||||
global.support.rpcDaemon('getblocktemplate', {
|
||||
reserve_size: 16,
|
||||
reserve_size: 17,
|
||||
wallet_address: walletAddress
|
||||
}, function(body){
|
||||
return callback(body);
|
||||
@@ -106,7 +106,9 @@ function Coin(data){
|
||||
Generating a block template is a simple thing. Ask for a boatload of information, and go from there.
|
||||
Important things to consider.
|
||||
The reserved space is 13 bytes long now in the following format:
|
||||
|minerNonce/extraNonce - 4 bytes|instanceId - 4 bytes|clientNonce - 4 bytes|clientPoolNonce - 4 bytes|
|
||||
Assuming that the extraNonce starts at byte 130:
|
||||
|130-133|134-137|138-141|142-145|
|
||||
|minerNonce/extraNonce - 4 bytes|instanceId - 4 bytes|clientPoolNonce - 4 bytes|clientNonce - 4 bytes|
|
||||
This is designed to allow a single block template to be used on up to 4 billion poolSlaves (clientPoolNonce)
|
||||
Each with 4 billion clients. (clientNonce)
|
||||
While being unique to this particular pool thread (instanceId)
|
||||
|
||||
Reference in New Issue
Block a user