mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Refactor Block (#10913)
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
This commit is contained in:
@ -708,9 +708,9 @@ mod tests {
|
||||
);
|
||||
assert_matches!(
|
||||
provider.transaction_sender(0), Ok(Some(sender))
|
||||
if sender == block.body[0].recover_signer().unwrap()
|
||||
if sender == block.body.transactions[0].recover_signer().unwrap()
|
||||
);
|
||||
assert_matches!(provider.transaction_id(block.body[0].hash), Ok(Some(0)));
|
||||
assert_matches!(provider.transaction_id(block.body.transactions[0].hash), Ok(Some(0)));
|
||||
}
|
||||
|
||||
{
|
||||
@ -725,7 +725,7 @@ mod tests {
|
||||
Ok(_)
|
||||
);
|
||||
assert_matches!(provider.transaction_sender(0), Ok(None));
|
||||
assert_matches!(provider.transaction_id(block.body[0].hash), Ok(None));
|
||||
assert_matches!(provider.transaction_id(block.body.transactions[0].hash), Ok(None));
|
||||
}
|
||||
}
|
||||
|
||||
@ -753,7 +753,7 @@ mod tests {
|
||||
.clone()
|
||||
.map(|tx_number| (
|
||||
tx_number,
|
||||
block.body[tx_number as usize].recover_signer().unwrap()
|
||||
block.body.transactions[tx_number as usize].recover_signer().unwrap()
|
||||
))
|
||||
.collect())
|
||||
);
|
||||
@ -766,7 +766,13 @@ mod tests {
|
||||
result,
|
||||
Ok(vec![(
|
||||
0,
|
||||
block.body.iter().cloned().map(|tx| tx.into_ecrecovered().unwrap()).collect()
|
||||
block
|
||||
.body
|
||||
.transactions
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|tx| tx.into_ecrecovered().unwrap())
|
||||
.collect()
|
||||
)])
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user