Skip to content

Commit 55d3f9a

Browse files
Merge master into staging (#1534)
* Give more money to test.near (#1467) * Give more money to test.near * Bump version * Reset state and bump version (#1499) * Bump version for Borsh (#1502) * Fix boot node in start_testnet.py (#1505) * Reduce total supply and adjust parameters (#1508) * Remove all warnings (#1516) * Add more bootnodes (#1525)
1 parent 1137a4c commit 55d3f9a

File tree

8 files changed

+15
-6
lines changed

8 files changed

+15
-6
lines changed

chain/client/tests/process_blocks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ fn test_time_attack() {
477477
let hash = hash(&b1.header.inner.try_to_vec().expect("Failed to serialize"));
478478
b1.header.hash = hash;
479479
b1.header.signature = signer.sign(hash.as_ref());
480-
client.process_block(b1, Provenance::NONE);
480+
let _ = client.process_block(b1, Provenance::NONE);
481481

482482
let b2 = client.produce_block(2, Duration::from_secs(1)).unwrap().unwrap();
483483
assert!(client.process_block(b2, Provenance::PRODUCED).1.is_ok());

runtime/near-vm-logic/tests/fixtures.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use near_vm_logic::VMContext;
22

3+
#[allow(dead_code)]
34
pub fn get_context(input: Vec<u8>, is_view: bool) -> VMContext {
45
VMContext {
56
current_account_id: "alice.near".to_string(),

runtime/near-vm-logic/tests/test_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ macro_rules! decl_test_bytes {
3434
let mut logic = VMLogic::new(&mut ext, context, &config, &promise_results, &mut memory);
3535
let res = vec![0u8; $input.len()];
3636
logic.$method(0).expect("read bytes into register from context should be ok");
37-
logic.read_register(0, res.as_ptr() as _).expect("read register should be ok");;
37+
logic.read_register(0, res.as_ptr() as _).expect("read register should be ok");
3838
assert_eq!(res, $input);
3939
}
4040
};

runtime/near-vm-logic/tests/test_miscs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ fn test_hash256() {
258258

259259
logic.sha256(data.len() as _, data.as_ptr() as _, 0).unwrap();
260260
let res = &vec![0u8; 32];
261-
logic.read_register(0, res.as_ptr() as _);
261+
let _ = logic.read_register(0, res.as_ptr() as _);
262262
assert_eq!(
263263
res,
264264
&[

runtime/near-vm-logic/tests/test_view_method.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ macro_rules! test_prohibited {
1212
let config = Config::default();
1313
let promise_results = vec![];
1414
let mut memory = MockedMemory::default();
15+
#[allow(unused_mut)]
1516
let mut logic = VMLogic::new(&mut ext, context, &config, &promise_results, &mut memory);
1617

1718
let name = stringify!($f);

runtime/near-vm-runner/tests/utils.rs

+2
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ pub fn make_simple_contract_call_with_gas(
4747
run(code_hash, code, method_name, &mut fake_external, context, &config, &promise_results)
4848
}
4949

50+
#[allow(dead_code)]
5051
pub fn make_simple_contract_call(
5152
code: &[u8],
5253
method_name: &[u8],
5354
) -> (Option<VMOutcome>, Option<VMError>) {
5455
make_simple_contract_call_with_gas(code, method_name, 1_000_000)
5556
}
5657

58+
#[allow(dead_code)]
5759
pub fn wat2wasm_no_validate(wat: &str) -> Vec<u8> {
5860
Wat2Wasm::new().validate(false).convert(wat).unwrap().as_ref().to_vec()
5961
}

scripts/start_testnet.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
print("* Running NEAR validator node for Official TestNet *")
1212
print("****************************************************")
1313

14-
DEFAULT_BOOT_NODE = "AJLCcX4Uymeq5ssavjUCyEA8SV6Y365Mh5h4shqMSTDA@34.94.33.164:24567"
14+
DEFAULT_BOOT_NODE = ','.join([
15+
"AJLCcX4Uymeq5ssavjUCyEA8SV6Y365Mh5h4shqMSTDA@34.94.33.164:24567",
16+
"EY9mX5FYyR1sqrGwkqCbUrmjgAtXs4DeNaf1sjG9MrkY@35.226.146.230:24567",
17+
"8K7NG5v2yvSq4A1wQuqSNvyY334BVq3ohvdu9wgpgjLG@104.154.188.160:24567",
18+
"FNCMYTt9Gexq6Nq3Z67gRX7eeZAh27swd1nrwN3smT9Q@35.246.133.183:24567",
19+
])
1520

1621
parser = argparse.ArgumentParser()
1722
parser.add_argument('--local', action='store_true', help='deprecated: use --nodocker')

tests/test_rejoin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ mod test {
2626
// to ensure they are not run in parallel.
2727

2828
fn send_transaction(
29-
nodes: &Vec<Arc<RwLock<Node>>>,
29+
nodes: &Vec<Arc<RwLock<dyn Node>>>,
3030
account_names: &Vec<AccountId>,
3131
nonces: &Vec<u64>,
3232
from: usize,
@@ -147,7 +147,7 @@ mod test {
147147
}
148148
})
149149
.collect();
150-
let nodes: Vec<Arc<RwLock<Node>>> =
150+
let nodes: Vec<Arc<RwLock<dyn Node>>> =
151151
nodes.into_iter().map(|cfg| Node::new_sharable(cfg)).collect();
152152
let account_names: Vec<_> =
153153
nodes.iter().map(|node| node.read().unwrap().account_id().unwrap()).collect();

0 commit comments

Comments
 (0)