mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 02:07:56 +00:00
Refactor to use only chain info (#4516)
This commit is contained in:
committed by
Bastian Köcher
parent
8ecc450fd9
commit
6d06a19f41
@@ -966,7 +966,7 @@ mod tests {
|
||||
fn returns_mutable_static() {
|
||||
let client = TestClientBuilder::new().set_execution_strategy(ExecutionStrategy::AlwaysWasm).build();
|
||||
let runtime_api = client.runtime_api();
|
||||
let block_id = BlockId::Number(client.info().chain.best_number);
|
||||
let block_id = BlockId::Number(client.chain_info().best_number);
|
||||
|
||||
let ret = runtime_api.returns_mutable_static(&block_id).unwrap();
|
||||
assert_eq!(ret, 33);
|
||||
@@ -997,7 +997,7 @@ mod tests {
|
||||
.set_heap_pages(REQUIRED_MEMORY_PAGES)
|
||||
.build();
|
||||
let runtime_api = client.runtime_api();
|
||||
let block_id = BlockId::Number(client.info().chain.best_number);
|
||||
let block_id = BlockId::Number(client.chain_info().best_number);
|
||||
|
||||
// On the first invocation we allocate approx. 768KB (75%) of stack and then trap.
|
||||
let ret = runtime_api.allocates_huge_stack_array(&block_id, true);
|
||||
@@ -1018,7 +1018,7 @@ mod tests {
|
||||
.set_heap_pages(8)
|
||||
.build();
|
||||
let runtime_api = client.runtime_api();
|
||||
let block_id = BlockId::Number(client.info().chain.best_number);
|
||||
let block_id = BlockId::Number(client.chain_info().best_number);
|
||||
|
||||
// Try to allocate 1024k of memory on heap. This is going to fail since it is twice larger
|
||||
// than the heap.
|
||||
@@ -1047,7 +1047,7 @@ mod tests {
|
||||
.set_execution_strategy(ExecutionStrategy::Both)
|
||||
.build();
|
||||
let runtime_api = client.runtime_api();
|
||||
let block_id = BlockId::Number(client.info().chain.best_number);
|
||||
let block_id = BlockId::Number(client.chain_info().best_number);
|
||||
|
||||
runtime_api.test_storage(&block_id).unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user