@@ -88,8 +88,8 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
88
88
var headerSize ;
89
89
if ( rpcData . version == 5 && rpcData . finalsaplingroothash ) {
90
90
headerSize = 112 ;
91
- /* } else if (rpcData.hashstateroot && rpcData.hashutxoroot) {
92
- headerSize = 181;*/
91
+ } else if ( rpcData . hashstateroot && rpcData . hashutxoroot ) {
92
+ headerSize = 181 ;
93
93
} else {
94
94
headerSize = 80 ;
95
95
}
@@ -114,12 +114,12 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
114
114
header . write ( rpcData . finalsaplingroothash , position , 32 , 'hex' ) ;
115
115
position += 32 ;
116
116
}
117
- /* if (rpcData.hashstateroot && rpcData.hashutxoroot) {
117
+ if ( rpcData . hashstateroot && rpcData . hashutxoroot ) {
118
118
header . write ( '00ffffffff000000000000000000000000000000000000000000000000000000000000' , position , 37 , 'hex' ) ;
119
119
header . write ( rpcData . hashutxoroot , position += 37 , 32 , 'hex' ) ;
120
120
header . write ( rpcData . hashstateroot , position += 32 , 32 , 'hex' ) ;
121
- header.write(nonce, position +=32, 4, 'hex');
122
- }*/
121
+ header . write ( nonce , position += 32 , 4 , 'hex' ) ;
122
+ }
123
123
header . write ( nonce , position , 4 , 'hex' ) ;
124
124
header . write ( rpcData . bits , position += 4 , 4 , 'hex' ) ;
125
125
header . write ( nTime , position += 4 , 4 , 'hex' ) ;
@@ -172,11 +172,11 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
172
172
if ( this . finalsaplingroothashReversed ) {
173
173
this . jobParams . push ( this . finalsaplingroothashReversed ) ;
174
174
}
175
- /* if (this.hashstaterootReversed && this.hashutxorootReversed) {
175
+ if ( this . hashstaterootReversed && this . hashutxorootReversed ) {
176
176
this . jobParams . push ( this . hashstaterootReversed ) ;
177
177
this . jobParams . push ( this . hashutxorootReversed ) ;
178
178
this . jobParams . push ( '0000000000000000000000000000000000000000000000000000000000000000ffffffff00' ) ;
179
- }*/
179
+ }
180
180
}
181
181
return this . jobParams ;
182
182
} ;
0 commit comments