Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Apr 15, 2024
1 parent 0e57cc6 commit bce3a5c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 34 deletions.
48 changes: 24 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions pallets/ethereum-checked/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ fn bounded_input(data: &'static str) -> EthereumTxInput {
.expect("input too large")
}

// A hacky way to get around crate pub visibility of the storage item.
#[frame_support::storage_alias]
type Pending<T: pallet_ethereum::Config> = StorageValue<
pallet_ethereum::Pallet<T>,
Vec<(Transaction, TransactionStatus, Receipt)>,
ValueQuery,
>;

#[test]
fn transact_works() {
ExtBuilder::default().build().execute_with(|| {
Expand All @@ -61,7 +53,7 @@ fn transact_works() {
RawOrigin::XcmEthereumTx(ALICE).into(),
store_tx
));
let pending = Pending::<TestRuntime>::get();
let pending = pallet_ethereum::Pending::<TestRuntime>::get();
assert_eq!(pending.len(), 2);

match pending[0] {
Expand Down Expand Up @@ -152,7 +144,7 @@ fn no_hash_collision() {
));
}

let mut tx_hashes = Pending::<TestRuntime>::get()
let mut tx_hashes = pallet_ethereum::Pending::<TestRuntime>::get()
.iter()
.map(|(tx, _, _)| tx.hash())
.collect::<Vec<_>>();
Expand Down

0 comments on commit bce3a5c

Please sign in to comment.