Make filter blockHash property name match EIP-234.

This commit is contained in:
Richard Moore 2020-05-20 23:50:35 -04:00
parent f963589400
commit ed29fac376
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

@ -120,7 +120,7 @@ export interface Filter extends EventFilter {
} }
export interface FilterByBlockHash extends EventFilter { export interface FilterByBlockHash extends EventFilter {
blockhash?: string; blockHash?: string;
} }
//export type CallTransactionable = { //export type CallTransactionable = {
@ -138,20 +138,20 @@ export abstract class ForkEvent extends Description {
} }
export class BlockForkEvent extends ForkEvent { export class BlockForkEvent extends ForkEvent {
readonly blockhash: string; readonly blockHash: string;
readonly _isBlockForkEvent?: boolean; readonly _isBlockForkEvent?: boolean;
constructor(blockhash: string, expiry?: number) { constructor(blockHash: string, expiry?: number) {
if (!isHexString(blockhash, 32)) { if (!isHexString(blockHash, 32)) {
logger.throwArgumentError("invalid blockhash", "blockhash", blockhash); logger.throwArgumentError("invalid blockHash", "blockHash", blockHash);
} }
super({ super({
_isForkEvent: true, _isForkEvent: true,
_isBlockForkEvent: true, _isBlockForkEvent: true,
expiry: (expiry || 0), expiry: (expiry || 0),
blockHash: blockhash blockHash: blockHash
}); });
} }
} }