Merge pull request #1664 from cosmos/ResultBlockResults-comet0.38
[Bugfix] replace comet38 begin/end_block_events with finalize_block_events (2)
This commit is contained in:
commit
04fc4ff39c
@ -6,8 +6,14 @@ and this project adheres to
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Replaxe axios with cross-fetch ([#1645])
|
||||
### Changed
|
||||
|
||||
- Replaxe axios with cross-fetch ([#1645])
|
||||
- Fix block events in CometBFT 0.38 API (`begin_block_events`/`end_block_events`
|
||||
-> `finalize_block_events`) in `RpcBlockResultsResponse` and
|
||||
`BlockResultsResponse` ([#1612])
|
||||
|
||||
[#1612]: https://github.com/cosmos/cosmjs/pull/1612
|
||||
[#1645]: https://github.com/cosmos/cosmjs/pull/1645
|
||||
|
||||
## [0.33.1] - 2025-03-12
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -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 || []),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
});
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user