chore: fix compile issues in stacks-node

This commit is contained in:
Jude Nelson
2024-05-14 14:19:19 -04:00
parent a71abf7b59
commit e6021f5bee
3 changed files with 5 additions and 5 deletions

View File

@@ -170,7 +170,7 @@ impl HttpResponse for RPCGetStxTransferCostRequestHandler {
impl StacksHttpRequest {
pub fn new_get_stx_transfer_cost(host: PeerHost) -> StacksHttpRequest {
let mut contents = HttpRequestContents::new();
let contents = HttpRequestContents::new();
StacksHttpRequest::new_for_peer(host, "GET".into(), "/v2/fees/transfer".into(), contents)
.expect("FATAL: failed to construct request from infallible data")
}

View File

@@ -4,7 +4,7 @@ use std::path::PathBuf;
use std::str::FromStr;
use std::sync::{Arc, Mutex};
use std::time::Duration;
use std::{fs, thread};
use std::{cmp, fs, thread};
use clarity::vm::costs::ExecutionCost;
use clarity::vm::types::{AssetIdentifier, PrincipalData, QualifiedContractIdentifier};
@@ -1329,8 +1329,8 @@ impl Config {
/// part dependent on the state machine getting block data back to the miner quickly, and thus
/// the poll time is dependent on the first attempt time.
pub fn get_poll_time(&self) -> u64 {
let poll_timeout = if config.node.miner {
cmp::min(5000, config.miner.first_attempt_time_ms / 2)
let poll_timeout = if self.node.miner {
cmp::min(5000, self.miner.first_attempt_time_ms / 2)
} else {
5000
};

View File

@@ -4171,7 +4171,7 @@ impl PeerThread {
net.bind(&p2p_sock, &rpc_sock)
.expect("BUG: PeerNetwork could not bind or is already bound");
let poll_timeout = config.get_poll_timeout();
let poll_timeout = config.get_poll_time();
PeerThread {
config,