Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d722a83a3 | |||
| 16acb844d7 |
@@ -43,7 +43,7 @@ function hash256(buffer) {
|
|||||||
|
|
||||||
function getMerkleRoot(transactions) {
|
function getMerkleRoot(transactions) {
|
||||||
if (transactions.length === 0) return null;
|
if (transactions.length === 0) return null;
|
||||||
if (transactions.length === 1) return transactions[0];
|
if (transactions.length === 1) return transactions[0].getHash();
|
||||||
let hashes = [ reverseBuffer(transactions[0]).toString('hex') ];
|
let hashes = [ reverseBuffer(transactions[0]).toString('hex') ];
|
||||||
transactions.split(1).forEach(function (value) {
|
transactions.split(1).forEach(function (value) {
|
||||||
hashes.push(value.hash);
|
hashes.push(value.hash);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cryptoforknote-util",
|
"name": "cryptoforknote-util",
|
||||||
"version": "9.0.13",
|
"version": "9.0.14",
|
||||||
"main": "cryptoforknote-util",
|
"main": "cryptoforknote-util",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "LucasJones",
|
"name": "LucasJones",
|
||||||
|
|||||||
Reference in New Issue
Block a user