Remove prepare script and checkMerkleRoot method on Block
This commit is contained in:
parent
492c435a1f
commit
0426c66389
4 changed files with 0 additions and 15 deletions
|
@ -28,7 +28,6 @@
|
||||||
"nobuild:coverage": "nyc --check-coverage --branches 90 --functions 90 --lines 90 mocha",
|
"nobuild:coverage": "nyc --check-coverage --branches 90 --functions 90 --lines 90 mocha",
|
||||||
"nobuild:integration": "mocha --timeout 50000 test/integration/",
|
"nobuild:integration": "mocha --timeout 50000 test/integration/",
|
||||||
"nobuild:unit": "mocha",
|
"nobuild:unit": "mocha",
|
||||||
"prepare": "npm run build",
|
|
||||||
"prettier": "prettier 'ts_src/**/*.ts' --ignore-path ./.prettierignore",
|
"prettier": "prettier 'ts_src/**/*.ts' --ignore-path ./.prettierignore",
|
||||||
"test": "npm run build && npm run format:ci && npm run lint && npm run nobuild:coverage",
|
"test": "npm run build && npm run format:ci && npm run lint && npm run nobuild:coverage",
|
||||||
"unit": "npm run build && npm run nobuild:unit"
|
"unit": "npm run build && npm run nobuild:unit"
|
||||||
|
|
|
@ -199,11 +199,6 @@ class Block {
|
||||||
return (this.__checkMerkleRoot() &&
|
return (this.__checkMerkleRoot() &&
|
||||||
(hasWitnessCommit ? this.__checkWitnessCommit() : true));
|
(hasWitnessCommit ? this.__checkWitnessCommit() : true));
|
||||||
}
|
}
|
||||||
checkMerkleRoot() {
|
|
||||||
console.warn('Deprecation Warning: Block method checkMerkleRoot will be ' +
|
|
||||||
'deprecated in v5. Please use checkTxRoots instead.');
|
|
||||||
return this.checkTxRoots();
|
|
||||||
}
|
|
||||||
checkProofOfWork() {
|
checkProofOfWork() {
|
||||||
const hash = bufferutils_1.reverseBuffer(this.getHash());
|
const hash = bufferutils_1.reverseBuffer(this.getHash());
|
||||||
const target = Block.calculateTarget(this.bits);
|
const target = Block.calculateTarget(this.bits);
|
||||||
|
|
|
@ -269,14 +269,6 @@ export class Block {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkMerkleRoot(): boolean {
|
|
||||||
console.warn(
|
|
||||||
'Deprecation Warning: Block method checkMerkleRoot will be ' +
|
|
||||||
'deprecated in v5. Please use checkTxRoots instead.',
|
|
||||||
);
|
|
||||||
return this.checkTxRoots();
|
|
||||||
}
|
|
||||||
|
|
||||||
checkProofOfWork(): boolean {
|
checkProofOfWork(): boolean {
|
||||||
const hash: Buffer = reverseBuffer(this.getHash());
|
const hash: Buffer = reverseBuffer(this.getHash());
|
||||||
const target = Block.calculateTarget(this.bits);
|
const target = Block.calculateTarget(this.bits);
|
||||||
|
|
1
types/block.d.ts
vendored
1
types/block.d.ts
vendored
|
@ -24,7 +24,6 @@ export declare class Block {
|
||||||
toBuffer(headersOnly: boolean): Buffer;
|
toBuffer(headersOnly: boolean): Buffer;
|
||||||
toHex(headersOnly: boolean): string;
|
toHex(headersOnly: boolean): string;
|
||||||
checkTxRoots(): boolean;
|
checkTxRoots(): boolean;
|
||||||
checkMerkleRoot(): boolean;
|
|
||||||
checkProofOfWork(): boolean;
|
checkProofOfWork(): boolean;
|
||||||
private __checkMerkleRoot;
|
private __checkMerkleRoot;
|
||||||
private __checkWitnessCommit;
|
private __checkWitnessCommit;
|
||||||
|
|
Loading…
Reference in a new issue