Skip to content

Commit 4319011

Browse files
committed
Improve tapleah hash parameter name
1 parent 5f81cf4 commit 4319011

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/payments/taprootutils.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types="node" />
22
import { Tapleaf, Taptree } from '../types';
33
export declare const LEAF_VERSION_TAPSCRIPT = 192;
4-
export declare function rootHashFromPath(controlBlock: Buffer, tapleafMsg: Buffer): Buffer;
4+
export declare function rootHashFromPath(controlBlock: Buffer, tapleafHash: Buffer): Buffer;
55
interface HashLeaf {
66
hash: Buffer;
77
}

src/payments/taprootutils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const bcrypto = require('../crypto');
66
const bufferutils_1 = require('../bufferutils');
77
const types_1 = require('../types');
88
exports.LEAF_VERSION_TAPSCRIPT = 0xc0;
9-
function rootHashFromPath(controlBlock, tapleafMsg) {
9+
function rootHashFromPath(controlBlock, tapleafHash) {
1010
const m = (controlBlock.length - 33) / 32;
11-
let kj = tapleafMsg;
11+
let kj = tapleafHash;
1212
for (let j = 0; j < m; j++) {
1313
const ej = controlBlock.slice(33 + 32 * j, 65 + 32 * j);
1414
if (kj.compare(ej) < 0) {

ts_src/payments/taprootutils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ export const LEAF_VERSION_TAPSCRIPT = 0xc0;
88

99
export function rootHashFromPath(
1010
controlBlock: Buffer,
11-
tapleafMsg: Buffer,
11+
tapleafHash: Buffer,
1212
): Buffer {
1313
const m = (controlBlock.length - 33) / 32;
1414

15-
let kj = tapleafMsg;
15+
let kj = tapleafHash;
1616
for (let j = 0; j < m; j++) {
1717
const ej = controlBlock.slice(33 + 32 * j, 65 + 32 * j);
1818
if (kj.compare(ej) < 0) {

0 commit comments

Comments
 (0)