Skip to content

Commit

Permalink
Fix build breaks in Node implementation (#215)
Browse files Browse the repository at this point in the history
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
  • Loading branch information
bestbeforetoday authored Mar 9, 2025
1 parent f0fa97f commit e411bb8
Show file tree
Hide file tree
Showing 5 changed files with 4,028 additions and 13 deletions.
4 changes: 3 additions & 1 deletion ts/formatter/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
lib/*.js
lib/*.js
dist/
node_modules/
7 changes: 4 additions & 3 deletions ts/formatter/lib/pretty-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ export class BlockDecoder {
}

header() {
const {header} = this.block.toObject();
const {number, previousHash, dataHash} = header;
const header = this.block.getHeader();
const previousHash = header.getPreviousHash_asU8();
const dataHash = header.getDataHash_asU8();

return {
number,
number: header.getNumber(),
previousHash: Buffer.from(previousHash).toString('hex'),
dataHash: Buffer.from(dataHash).toString('hex')
};
Expand Down
4 changes: 2 additions & 2 deletions ts/formatter/lib/proto/common-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export function identity(bytes: Uint8Array) {
const _ = SerializedIdentity.deserializeBinary(bytes)
return {
mspid: _.getMspid(),
idBytes: Buffer.from(_.getIdBytes()).toString()
idBytes: Buffer.from(_.getIdBytes_asU8()).toString()
}
}
}
Loading

0 comments on commit e411bb8

Please sign in to comment.