Skip to content

Commit cfd062e

Browse files
committed
fix unit test
1 parent 0ad055a commit cfd062e

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

crates/scroll/chainspec/src/genesis.rs

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ impl TryFrom<&OtherFields> for ScrollChainConfig {
121121
type Error = serde_json::Error;
122122

123123
fn try_from(others: &OtherFields) -> Result<Self, Self::Error> {
124-
let a = others.get_deserialized::<Self>("scroll");
125124
if let Some(Ok(scroll_chain_config)) = others.get_deserialized::<Self>("scroll") {
126125
Ok(scroll_chain_config)
127126
} else {

crates/scroll/chainspec/src/lib.rs

+16-13
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,10 @@ mod tests {
471471
"scroll": {
472472
"feeVaultAddress": "0x5300000000000000000000000000000000000005",
473473
"l1Config": {
474-
"l1ChainId": "1",
474+
"l1ChainId": 1,
475475
"l1MessageQueueAddress": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B",
476476
"scrollChainAddress": "0xa13BAF47339d63B743e7Da8741db5456DAc1E556",
477-
"numL1MessagesPerBlock": "10"
477+
"numL1MessagesPerBlock": 10
478478
}
479479
}
480480
}
@@ -496,10 +496,10 @@ mod tests {
496496
&serde_json::json!({
497497
"feeVaultAddress": "0x5300000000000000000000000000000000000005",
498498
"l1Config": {
499-
"l1ChainId": "1",
499+
"l1ChainId": 1,
500500
"l1MessageQueueAddress": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B",
501501
"scrollChainAddress": "0xa13BAF47339d63B743e7Da8741db5456DAc1E556",
502-
"numL1MessagesPerBlock": "10"
502+
"numL1MessagesPerBlock": 10
503503
}
504504
})
505505
);
@@ -541,15 +541,18 @@ mod tests {
541541
(String::from("curieBlock"), 0.into()),
542542
(String::from("darwinTime"), 0.into()),
543543
(String::from("darwinV2Time"), 0.into()),
544-
(String::from("scroll"), json!({
545-
"feeVaultAddress": "0x5300000000000000000000000000000000000005",
546-
"l1Config": {
547-
"l1ChainId": "1",
548-
"l1MessageQueueAddress": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B",
549-
"scrollChainAddress": "0xa13BAF47339d63B743e7Da8741db5456DAc1E556",
550-
"numL1MessagesPerBlock": "10"
551-
}
552-
})),
544+
(
545+
String::from("scroll"),
546+
serde_json::json!({
547+
"feeVaultAddress": "0x5300000000000000000000000000000000000005",
548+
"l1Config": {
549+
"l1ChainId": 1,
550+
"l1MessageQueueAddress": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B",
551+
"scrollChainAddress": "0xa13BAF47339d63B743e7Da8741db5456DAc1E556",
552+
"numL1MessagesPerBlock": 10
553+
}
554+
}),
555+
),
553556
]
554557
.into_iter()
555558
.collect(),

0 commit comments

Comments
 (0)