Skip to content

Commit

Permalink
Don't wrap block params in an option if using abcipp
Browse files Browse the repository at this point in the history
  • Loading branch information
james-chf committed Dec 13, 2022
1 parent c224151 commit 663791a
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions apps/src/lib/node/ledger/tendermint_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,27 +456,19 @@ async fn write_tm_genesis(
genesis.genesis_time = genesis_time
.try_into()
.expect("Couldn't convert DateTimeUtc to Tendermint Time");
let size = block::Size {
// maximum size of a serialized Tendermint block
// cannot go over 100 MiB
max_bytes: (100 << 20) - 1, /* unsure if we are dealing with an open
* range, so it's better to subtract one,
* here */
// gas is metered app-side, so we disable it
// at the Tendermint level
max_gas: -1,
};
#[cfg(not(feature = "abcipp"))]
{
// NOTE(feature = "abcipp"): this setting of the block consensus
// parameters is guarded for the time being as it is different for
// Tendermint v0.37 to the ABCI++-compatible tendermint-rs we were using
// previously. Once ABCI++ is finished, hopefully the layout of
// these block consensus parameters will be similar if not the
// same.
genesis.consensus_params.block = Some(block::Size {
// maximum size of a serialized Tendermint block
// cannot go over 100 MiB
max_bytes: (100 << 20) - 1, /* unsure if we are dealing with an
* open
* range, so it's better to subtract
* one,
* here */
// gas is metered app-side, so we disable it
// at the Tendermint level
max_gas: -1,
});
}
let size = Some(size);
genesis.consensus_params.block = size;
#[cfg(feature = "abcipp")]
{
genesis.consensus_params.timeout.commit =
Expand Down

0 comments on commit 663791a

Please sign in to comment.