Skip to content

Commit

Permalink
Patched the finalization schema
Browse files Browse the repository at this point in the history
  • Loading branch information
rg911 committed Dec 10, 2020
1 parent 4a15dd5 commit ec4753b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"ripemd160": "^2.0.2",
"rxjs": "^6.6.3",
"rxjs-compat": "^6.6.3",
"symbol-openapi-typescript-fetch-client": "0.10.4",
"symbol-openapi-typescript-fetch-client": "0.10.5-SNAPSHOT.202012101637",
"tweetnacl": "^1.0.3",
"ws": "^7.3.1"
},
Expand Down
1 change: 1 addition & 0 deletions src/infrastructure/FinalizationHttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export class FinalizationHttp extends Http implements FinalizationRepository {
new BmTreeSignature(
new ParentPublicKeySignaturePair(s.root.parentPublicKey, s.root.signature),
new ParentPublicKeySignaturePair(s.bottom.parentPublicKey, s.bottom.signature),
s.top ? new ParentPublicKeySignaturePair(s.top.parentPublicKey, s.top.signature) : undefined,
),
),
mg.signatureSchema,
Expand Down
4 changes: 4 additions & 0 deletions src/model/finalization/BmTreeSignature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@ export class BmTreeSignature {
* Bottom.
*/
public readonly bottom: ParentPublicKeySignaturePair,
/**
* top (for testnet/3 V1 schema only).
*/
public readonly top?: ParentPublicKeySignaturePair,
) {}
}
1 change: 1 addition & 0 deletions test/infrastructure/FinalizationHttp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('FinalizationHttp', () => {
const tree = {} as BmTreeSignature;
tree.bottom = ps;
tree.root = ps;
tree.top = undefined;

mg.signatures = [tree];
dto.messageGroups = [mg];
Expand Down

0 comments on commit ec4753b

Please sign in to comment.