Skip to content

Commit 5b63035

Browse files
fix
1 parent b7d47e2 commit 5b63035

File tree

1 file changed

+20
-20
lines changed
  • monad-rpc/src/handlers/eth

1 file changed

+20
-20
lines changed

monad-rpc/src/handlers/eth/txn.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -574,26 +574,26 @@ mod tests {
574574
// Test the same validation failures as eth_sendRawTransaction
575575
// to ensure both methods have consistent validation
576576
let expected_failures = [
577-
MonadEthSendRawTransactionSyncParams(
578-
serialize_tx(make_tx(sender, 1000, 1000, 21_000, 11, 1337)), // invalid chain id
579-
Some(2000),
580-
),
581-
MonadEthSendRawTransactionSyncParams(
582-
serialize_tx(make_tx(sender, 1000, 1000, 1_000, 11, 1)), // intrinsic gas too low
583-
Some(2000),
584-
),
585-
MonadEthSendRawTransactionSyncParams(
586-
serialize_tx(make_tx(sender, 1000, 1000, 400_000_000_000, 11, 1)), // gas too high
587-
Some(2000),
588-
),
589-
MonadEthSendRawTransactionSyncParams(
590-
serialize_tx(make_tx(sender, 1000, 1000, 21_000, 1, 1)), // nonce too low
591-
Some(2000),
592-
),
593-
MonadEthSendRawTransactionSyncParams(
594-
serialize_tx(make_tx(sender, 1000, 12000, 21_000, 11, 1)), // max priority fee too high
595-
Some(2000),
596-
),
577+
MonadEthSendRawTransactionSyncParams {
578+
hex_tx: serialize_tx(make_tx(sender, 1000, 1000, 21_000, 11, 1337)), // invalid chain id
579+
timeout_ms: Some(2000),
580+
},
581+
MonadEthSendRawTransactionSyncParams {
582+
hex_tx: serialize_tx(make_tx(sender, 1000, 1000, 1_000, 11, 1)), // intrinsic gas too low
583+
timeout_ms: Some(2000),
584+
},
585+
MonadEthSendRawTransactionSyncParams {
586+
hex_tx: serialize_tx(make_tx(sender, 1000, 1000, 400_000_000_000, 11, 1)), // gas too high
587+
timeout_ms: Some(2000),
588+
},
589+
MonadEthSendRawTransactionSyncParams {
590+
hex_tx: serialize_tx(make_tx(sender, 1000, 1000, 21_000, 1, 1)), // nonce too low
591+
timeout_ms: Some(2000),
592+
},
593+
MonadEthSendRawTransactionSyncParams {
594+
hex_tx: serialize_tx(make_tx(sender, 1000, 12000, 21_000, 11, 1)), // max priority fee too high
595+
timeout_ms: Some(2000),
596+
},
597597
];
598598

599599
for (idx, case) in expected_failures.into_iter().enumerate() {

0 commit comments

Comments
 (0)