Skip to content
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

[Bugfix] replace comet38 begin/end_block_events with finalize_block_events #1612

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 2 additions & 4 deletions packages/tendermint-rpc/src/comet38/adaptor/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,7 @@ export function decodeValidatorUpdate(data: RpcValidatorUpdate): responses.Valid
interface RpcBlockResultsResponse {
readonly height: string;
readonly txs_results: readonly RpcTxData[] | null;
readonly begin_block_events: readonly RpcEvent[] | null;
readonly end_block_events: readonly RpcEvent[] | null;
readonly finalize_block_events: readonly RpcEvent[] | null;
readonly validator_updates: readonly RpcValidatorUpdate[] | null;
readonly consensus_param_updates: RpcConsensusParams | null;
}
Expand All @@ -299,8 +298,7 @@ function decodeBlockResults(data: RpcBlockResultsResponse): responses.BlockResul
results: (data.txs_results || []).map(decodeTxData),
validatorUpdates: (data.validator_updates || []).map(decodeValidatorUpdate),
consensusUpdates: may(decodeConsensusParams, data.consensus_param_updates),
beginBlockEvents: decodeEvents(data.begin_block_events || []),
endBlockEvents: decodeEvents(data.end_block_events || []),
finalizeBlockEvents: decodeEvents(data.finalize_block_events || [])
};
}

Expand Down
3 changes: 1 addition & 2 deletions packages/tendermint-rpc/src/comet38/comet38client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ function defaultTestSuite(rpcFactory: () => RpcClient, expected: ExpectedValues)
const results = await client.blockResults(height);
expect(results.height).toEqual(height);
expect(results.results).toEqual([]);
expect(results.beginBlockEvents).toEqual([]);
expect(results.endBlockEvents).toEqual([]);
expect(results.finalizeBlockEvents).toEqual([]);

client.disconnect();
});
Expand Down
3 changes: 1 addition & 2 deletions packages/tendermint-rpc/src/comet38/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ export interface BlockResultsResponse {
readonly results: readonly TxData[];
readonly validatorUpdates: readonly ValidatorUpdate[];
readonly consensusUpdates?: ConsensusParams;
readonly beginBlockEvents: readonly Event[];
readonly endBlockEvents: readonly Event[];
readonly finalizeBlockEvents: readonly Event[];
}

export interface BlockSearchResponse {
Expand Down