Skip to content

Commit

Permalink
chore: rename constant
Browse files Browse the repository at this point in the history
  • Loading branch information
jjyr committed Nov 27, 2022
1 parent 435d492 commit a62142e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/config/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pub const MAX_TX_SIZE: usize = 50_000;
/// MAX withdrawal size 50 KB
pub const MAX_WITHDRAWAL_SIZE: usize = 50_000;
// 25 KB
pub const MAX_WRITE_DATA_BYTES_LIMIT: usize = 25 * 1024;
pub const MAX_WRITE_DATA_BYTES: usize = 25 * 1024;
// 2MB
pub const MAX_TOTAL_READ_DATA_BYTES_LIMIT: usize = 1024 * 1024 * 2;
pub const MAX_TOTAL_READ_DATA_BYTES: usize = 1024 * 1024 * 2;
/// Max cycles of a layer2 transaction
pub const L2TX_MAX_CYCLES_150M: u64 = 150_000_000;
/// Max cycles of a layer2 transaction
Expand Down
8 changes: 4 additions & 4 deletions crates/config/src/fork_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use ckb_fixed_hash::H256;
use serde::{Deserialize, Serialize};

use crate::constants::{
L2TX_MAX_CYCLES_150M, L2TX_MAX_CYCLES_500M, MAX_TOTAL_READ_DATA_BYTES_LIMIT, MAX_TX_SIZE,
MAX_WITHDRAWAL_SIZE, MAX_WRITE_DATA_BYTES_LIMIT,
L2TX_MAX_CYCLES_150M, L2TX_MAX_CYCLES_500M, MAX_TOTAL_READ_DATA_BYTES, MAX_TX_SIZE,
MAX_WITHDRAWAL_SIZE, MAX_WRITE_DATA_BYTES,
};

#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
Expand Down Expand Up @@ -67,11 +67,11 @@ impl ForkConfig {
}

pub fn max_write_data_bytes(&self, _block_number: u64) -> usize {
MAX_WRITE_DATA_BYTES_LIMIT
MAX_WRITE_DATA_BYTES
}

pub fn max_total_read_data_bytes(&self, _block_number: u64) -> usize {
MAX_TOTAL_READ_DATA_BYTES_LIMIT
MAX_TOTAL_READ_DATA_BYTES
}
}

Expand Down

0 comments on commit a62142e

Please sign in to comment.