Skip to content

Commit 3541220

Browse files
committed
using Buffer.from([0x00]
1 parent 1c18fe6 commit 3541220

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/transaction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class Transaction {
389389
// https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-19
390390
return bcrypto.taggedHash(
391391
'TapSighash',
392-
Buffer.concat([Buffer.alloc(1), sigMsgWriter.end()]),
392+
Buffer.concat([Buffer.from([0x00]), sigMsgWriter.end()]),
393393
);
394394
}
395395
hashForWitnessV0(inIndex, prevOutScript, value, hashType) {

ts_src/transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ export class Transaction {
490490
// https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-19
491491
return bcrypto.taggedHash(
492492
'TapSighash',
493-
Buffer.concat([Buffer.alloc(1), sigMsgWriter.end()]),
493+
Buffer.concat([Buffer.from([0x00]), sigMsgWriter.end()]),
494494
);
495495
}
496496

0 commit comments

Comments
 (0)