-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving window normalized fee #929
Conversation
isaacJChen
commented
Nov 18, 2020
- Calculate normalized fee
- Version protocol parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments.
@@ -21,17 +22,26 @@ export default class NormalizedFeeCalculator implements IFeeCalculator { | |||
} | |||
|
|||
public async getNormalizedFee (block: number): Promise<number> { | |||
// DB call optimization | |||
// https://github.com/decentralized-identity/sidetree/issues/936 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: standard patterns is to append TODO
to enable searching and automated tooling (such as extension in VSC).
// https://github.com/decentralized-identity/sidetree/issues/936 | |
// TODO: https://github.com/decentralized-identity/sidetree/issues/936 |
* Normalized fee sohuld always be populated in core layer when core makes call to transactions endpoint. | ||
* It may not be populated in blockchain service. This allows flexibility for the value to be computed on the spot or stored. | ||
* To remove potentially dangerous behavior. Make a seperate model | ||
* https://github.com/decentralized-identity/sidetree/issues/937 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: add TODO for tooling/searching.
* https://github.com/decentralized-identity/sidetree/issues/937 | |
* TODO: https://github.com/decentralized-identity/sidetree/issues/937 |
@@ -149,8 +149,8 @@ export default class BitcoinProcessor { | |||
/** | |||
* Initializes the Bitcoin processor | |||
*/ | |||
public async initialize () { | |||
await this.versionManager.initialize(this.blockMetadataStore); | |||
public async initialize (versionModels: BitcoinVersionModel[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess BitcoinProcessor
was the example I was looking for for dependency injection, so I still want to make sure we have an agreed upon pattern. Let's discuss but won't block the PR on this.
@@ -63,7 +65,7 @@ export default class JasmineSidetreeErrorValidator { | |||
} | |||
|
|||
if (!validated) { | |||
fail(`Expected error '${expectedErrorCode}' did not occur.`); | |||
fail(`Expected error '${expectedErrorCode}' did not occur. Instead got '${actualError.code}'`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL!