Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client/rpc/src/eth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use sc_client_api::backend::{Backend, StateBackend, StorageProvider};
use sc_network::{ExHashT, NetworkService};
use sc_transaction_pool::{ChainApi, Pool};
use sc_transaction_pool_api::{InPoolTransaction, TransactionPool};
use sp_api::{Core, ProvideRuntimeApi};
use sp_api::{Core, HeaderT, ProvideRuntimeApi};
use sp_block_builder::BlockBuilder as BlockBuilderApi;
use sp_blockchain::HeaderBackend;
use sp_core::hashing::keccak_256;
Expand Down Expand Up @@ -482,7 +482,8 @@ where
.collect::<Vec<<B as BlockT>::Extrinsic>>();
// Manually initialize the overlay.
let header = client.header(best).unwrap().unwrap();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to remove all those unwraps.

api.initialize_block(&best, &header)
let parent_hash = BlockId::Hash(*header.parent_hash());
api.initialize_block(&parent_hash, &header)
.map_err(|e| internal_err(format!("Runtime api access error: {:?}", e)))?;
// Apply the ready queue to the best block's state.
for xt in xts {
Expand Down
1 change: 1 addition & 0 deletions ts-tests/tests/test-balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describeWithFrontier("Frontier RPC (Balance)", (context) => {
});

step("balance to be updated after transfer", async function () {
await createAndFinalizeBlock(context.web3);
this.timeout(15000);

const value = "0x200"; // 512, must be higher than ExistentialDeposit
Expand Down
1 change: 1 addition & 0 deletions ts-tests/tests/test-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describeWithFrontier("Frontier RPC (Contract)", (context) => {
// to spin up a frontier node, it saves a lot of time.

it("contract creation should return transaction hash", async function () {
await createAndFinalizeBlock(context.web3);
this.timeout(15000);
const tx = await context.web3.eth.accounts.signTransaction(
{
Expand Down