Updated RTM utils
This commit is contained in:
2
index.js
2
index.js
@@ -69,7 +69,7 @@ function getMerkleRoot(transactions, transaction_hash_func, detectWitness) {
|
|||||||
const forWitness = detectWitness ? txesHaveWitnessCommit(transactions) : false;
|
const forWitness = detectWitness ? txesHaveWitnessCommit(transactions) : false;
|
||||||
const hashes = transactions.map(transaction => transaction_hash_func(transaction, forWitness));
|
const hashes = transactions.map(transaction => transaction_hash_func(transaction, forWitness));
|
||||||
const rootHash = fastMerkleRoot(hashes, hash256);
|
const rootHash = fastMerkleRoot(hashes, hash256);
|
||||||
return forWitness ? hash256_3(Buffer.concat([rootHash, transactions[0].ins[0].witness[0]])) : rootHash;
|
return forWitness ? hash256(Buffer.concat([rootHash, transactions[0].ins[0].witness[0]])) : rootHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
let last_epoch_number;
|
let last_epoch_number;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cryptoforknote-util",
|
"name": "cryptoforknote-util",
|
||||||
"version": "15.3.19",
|
"version": "15.3.20",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "LucasJones",
|
"name": "LucasJones",
|
||||||
"email": "lucasjonesdev@hotmail.co.uk"
|
"email": "lucasjonesdev@hotmail.co.uk"
|
||||||
|
|||||||
Reference in New Issue
Block a user