mirror of
https://github.com/jwinterm/grim.git
synced 2026-10-23 08:18:32 +02:00
build: update package info, other dependencies
This commit is contained in:
@@ -81,7 +81,7 @@ impl WalletConfig {
|
||||
min_confirmations: MIN_CONFIRMATIONS_DEFAULT,
|
||||
use_dandelion: Some(true),
|
||||
enable_tor_listener: Some(false),
|
||||
api_port: Some(rand::thread_rng().gen_range(10000..30000)),
|
||||
api_port: Some(rand::rng().random_range(10000..30000)),
|
||||
};
|
||||
Settings::write_to_file(&config, config_path);
|
||||
config
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
use grin_keychain::mnemonic::{from_entropy, search, to_entropy};
|
||||
use grin_util::ZeroingString;
|
||||
use rand::{Rng, thread_rng};
|
||||
use rand::Rng;
|
||||
|
||||
use crate::wallet::types::{PhraseMode, PhraseSize, PhraseWord};
|
||||
|
||||
@@ -100,10 +100,10 @@ impl Mnemonic {
|
||||
fn generate_words(mode: &PhraseMode, size: &PhraseSize) -> Vec<PhraseWord> {
|
||||
match mode {
|
||||
PhraseMode::Generate => {
|
||||
let mut rng = thread_rng();
|
||||
let mut rng = rand::rng();
|
||||
let mut entropy: Vec<u8> = Vec::with_capacity(size.entropy_size());
|
||||
for _ in 0..size.entropy_size() {
|
||||
entropy.push(rng.gen());
|
||||
entropy.push(rng.random());
|
||||
}
|
||||
from_entropy(&entropy).unwrap()
|
||||
.split(" ")
|
||||
|
||||
@@ -1415,7 +1415,7 @@ fn sync_wallet_data(wallet: &Wallet, from_node: bool) {
|
||||
/// Start Foreign API server to receive txs over transport and mining rewards.
|
||||
fn start_api_server(wallet: &Wallet) -> Result<(ApiServer, u16), Error> {
|
||||
let host = "127.0.0.1";
|
||||
let port = wallet.get_config().api_port.unwrap_or(rand::thread_rng().gen_range(10000..30000));
|
||||
let port = wallet.get_config().api_port.unwrap_or(rand::rng().random_range(10000..30000));
|
||||
let free_port = (port..).find(|port| {
|
||||
return match TcpListener::bind((host, port.to_owned())) {
|
||||
Ok(_) => {
|
||||
|
||||
Reference in New Issue
Block a user