mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-04-02 08:58:02 +02:00
Fixed issue where if script ended in 00's it would not put nonces in correct position
This commit is contained in:
parent
057fbe785f
commit
0c80b084ee
@ -92,7 +92,9 @@ export class MiningJob {
|
||||
}
|
||||
|
||||
// set the nonces
|
||||
testBlock.transactions[0].ins[0].script = Buffer.from(testBlock.transactions[0].ins[0].script.toString('hex').replace('0000000000000000', `${extraNonce}${extraNonce2}`), 'hex');
|
||||
const nonceFreeScript = testBlock.transactions[0].ins[0].script.toString('hex');
|
||||
|
||||
testBlock.transactions[0].ins[0].script = Buffer.from(`${nonceFreeScript.substring(0, nonceFreeScript.length - 16)}${extraNonce}${extraNonce2}`, 'hex');
|
||||
|
||||
//@ts-ignore
|
||||
//recompute the root
|
||||
|
Loading…
x
Reference in New Issue
Block a user