mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 17:15:03 -07:00
update submitted ntime!
This commit is contained in:
@@ -76,7 +76,7 @@ export class MiningJob {
|
||||
|
||||
}
|
||||
|
||||
public copyAndUpdateBlock(versionMaskString: number, nonce: number, extraNonce: string, extraNonce2: string): bitcoinjs.Block {
|
||||
public copyAndUpdateBlock(versionMaskString: number, nonce: number, extraNonce: string, extraNonce2: string, timestamp: number): bitcoinjs.Block {
|
||||
|
||||
const testBlock = bitcoinjs.Block.fromBuffer(this.block.toBuffer());
|
||||
|
||||
@@ -93,7 +93,9 @@ export class MiningJob {
|
||||
|
||||
//@ts-ignore
|
||||
//recompute the root
|
||||
testBlock.merkleRoot = this.calculateMerkleRootHash(testBlock.transactions[0].__toBuffer(), this.merkle_branch);;
|
||||
testBlock.merkleRoot = this.calculateMerkleRootHash(testBlock.transactions[0].__toBuffer(), this.merkle_branch);
|
||||
|
||||
testBlock.timestamp = timestamp
|
||||
|
||||
return testBlock;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user