Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

fix: create buffers from decoded multihash digests #287

Merged
merged 2 commits into from
Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"ethereumjs-block": "^2.2.0",
"ipld-bitcoin": "^0.4.0",
"ipld-ethereum": "^5.0.0",
"ipld-git": "^0.6.0",
"ipld-git": "^0.6.1",
"ipld-in-memory": "^5.0.0",
"ipld-zcash": "^0.5.0",
"merkle-patricia-tree": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions test/ipld-bitcoin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const IPLDResolver = require('../src')
const buildBitcoinBlock = (header) => {
const block = new BitcoinBlock()
block.version = header.version || 0
block.prevHash = header.prevHash || Buffer.alloc(32)
block.merkleRoot = header.merkleRoot || Buffer.alloc(32)
block.prevHash = header.prevHash ? Buffer.from(header.prevHash) : Buffer.alloc(32)
block.merkleRoot = header.merkleRoot ? Buffer.from(header.merkleRoot) : Buffer.alloc(32)
block.timestamp = header.timestamp || 0
block.bits = header.bits || 0
block.nonce = header.nonce || 0
Expand Down