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:
Alexander Blair
2017-07-04 10:04:17 -07:00
parent 9f62144d04
commit a875391b0c
+4 -2
View File
@@ -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)