update dependence version for gag to latest support windows (#17801)

* update dependence version for gag to leatest support windows

* fix compile on windows

* add Cargo.lock
This commit is contained in:
Govlzkoy 2021-06-08 14:17:16 +08:00 committed by GitHub
parent de9012ce36
commit e0ab5ee4f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 8 deletions

17
Cargo.lock generated
View File

@ -1347,6 +1347,17 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da"
[[package]]
name = "filedescriptor"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a71e83755e51aa52b9034f1986173783789e8e7d79c3c774adbbb63fb554f2cb"
dependencies = [
"libc",
"thiserror",
"winapi 0.3.8",
]
[[package]]
name = "filetime"
version = "0.2.10"
@ -1540,11 +1551,11 @@ dependencies = [
[[package]]
name = "gag"
version = "0.1.10"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cc0b9f53275dc5fada808f1d2f82e3688a6c14d735633d1590b7be8eb2307b5"
checksum = "a713bee13966e9fbffdf7193af71d54a6b35a0bb34997cd6c9519ebeb5005972"
dependencies = [
"libc",
"filedescriptor",
"tempfile",
]

View File

@ -74,7 +74,7 @@ fn make_accounts_txs(
.into_par_iter()
.map(|_| {
let mut new = dummy.clone();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen::<u8>()).collect();
if !same_payer {
new.message.account_keys[0] = solana_sdk::pubkey::new_rand();
}
@ -185,7 +185,7 @@ fn main() {
genesis_config.hash(),
);
// Ignore any pesky duplicate signature errors in the case we are using single-payer
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen::<u8>()).collect();
fund.signatures = vec![Signature::new(&sig[0..64])];
let x = bank.process_transaction(&fund);
x.unwrap();
@ -351,7 +351,7 @@ fn main() {
if bank.slot() > 0 && bank.slot() % 16 == 0 {
for tx in transactions.iter_mut() {
tx.message.recent_blockhash = bank.last_blockhash();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen()).collect();
let sig: Vec<u8> = (0..64).map(|_| thread_rng().gen::<u8>()).collect();
tx.signatures[0] = Signature::new(&sig[0..64]);
}
verified = to_packets_chunked(&transactions.clone(), packets_per_chunk);

View File

@ -12,7 +12,7 @@ documentation = "https://docs.rs/solana-local-cluster"
[dependencies]
crossbeam-channel = "0.5"
itertools = "0.9.0"
gag = "0.1.10"
gag = "1.0.0"
fs_extra = "1.2.0"
log = "0.4.11"
rand = "0.7.0"

View File

@ -61,7 +61,7 @@ pub fn redirect_stderr_to_file(logfile: Option<String>) -> Option<JoinHandle<()>
#[cfg(not(unix))]
{
println!("logging to a file is not supported on this platform");
()
None
}
}
};