mirror of
https://github.com/creating2morrow/neveko.git
synced 2025-01-08 20:09:47 +00:00
increase server json limit for successful txset broadcast
This commit is contained in:
parent
344cd4e304
commit
d364cde916
4 changed files with 13 additions and 5 deletions
|
@ -100,7 +100,7 @@ async fn find_tunnels() {
|
||||||
|
|
||||||
/// Called on application startup for i2p tunnel creation,
|
/// Called on application startup for i2p tunnel creation,
|
||||||
///
|
///
|
||||||
/// proxy tunnel, etc. Logs proxy status every minute.
|
/// proxy tunnel, etc. Logs proxy status every 10 minutes.
|
||||||
pub async fn start() {
|
pub async fn start() {
|
||||||
info!("starting i2p-zero");
|
info!("starting i2p-zero");
|
||||||
let args = args::Args::parse();
|
let args = args::Args::parse();
|
||||||
|
@ -116,7 +116,8 @@ pub async fn start() {
|
||||||
find_tunnels().await;
|
find_tunnels().await;
|
||||||
{
|
{
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let tick: std::sync::mpsc::Receiver<()> = schedule_recv::periodic_ms(600000);
|
let tick: std::sync::mpsc::Receiver<()> =
|
||||||
|
schedule_recv::periodic_ms(crate::I2P_CONNECTIVITY_CHECK_INTERVAL);
|
||||||
loop {
|
loop {
|
||||||
tick.recv().unwrap();
|
tick.recv().unwrap();
|
||||||
check_connection().await;
|
check_connection().await;
|
||||||
|
|
|
@ -67,4 +67,5 @@ pub const I2P_ZERO_RELEASH_HASH: &str =
|
||||||
"14f34052ad6abb0c24b048816b0ea86b696ae350dd139dd1e90a67ca88e1d07a";
|
"14f34052ad6abb0c24b048816b0ea86b696ae350dd139dd1e90a67ca88e1d07a";
|
||||||
|
|
||||||
pub const LMDB_MAPSIZE: u64 = 1 * 1024 * 1024 * 1024;
|
pub const LMDB_MAPSIZE: u64 = 1 * 1024 * 1024 * 1024;
|
||||||
|
pub const I2P_CONNECTIVITY_CHECK_INTERVAL: u32 = 600000;
|
||||||
// DO NOT EDIT BELOW THIS LINE
|
// DO NOT EDIT BELOW THIS LINE
|
||||||
|
|
|
@ -299,7 +299,10 @@ pub async fn trigger_nasr(
|
||||||
let proxy = reqwest::Proxy::http(&host)?;
|
let proxy = reqwest::Proxy::http(&host)?;
|
||||||
let client = reqwest::Client::builder().proxy(proxy).build();
|
let client = reqwest::Client::builder().proxy(proxy).build();
|
||||||
match client?
|
match client?
|
||||||
.post(format!("http://{}/market/nasr/{}/{}", &customer, vendor, orid))
|
.post(format!(
|
||||||
|
"http://{}/market/nasr/{}/{}",
|
||||||
|
&customer, vendor, orid
|
||||||
|
))
|
||||||
.header("proof", jwp)
|
.header("proof", jwp)
|
||||||
.send()
|
.send()
|
||||||
.await
|
.await
|
||||||
|
@ -482,10 +485,8 @@ pub async fn transmit_ship_request(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: sor is injecting order id instead of base 32 address FIX IT!
|
// TODO: sor is injecting order id instead of base 32 address FIX IT!
|
||||||
|
|
||||||
|
|
||||||
/// Executes GET /order/retrieve/orid/signature returning the order information
|
/// Executes GET /order/retrieve/orid/signature returning the order information
|
||||||
///
|
///
|
||||||
/// from the vendor.
|
/// from the vendor.
|
||||||
|
|
|
@ -3,6 +3,10 @@ extern crate rocket;
|
||||||
|
|
||||||
use neveko::*;
|
use neveko::*;
|
||||||
use neveko_core::*;
|
use neveko_core::*;
|
||||||
|
use rocket::data::{
|
||||||
|
Limits,
|
||||||
|
ToByteUnit,
|
||||||
|
};
|
||||||
|
|
||||||
// The only changes below here should be mounting new controller methods
|
// The only changes below here should be mounting new controller methods
|
||||||
#[launch]
|
#[launch]
|
||||||
|
@ -10,6 +14,7 @@ async fn rocket() -> _ {
|
||||||
let config = rocket::Config {
|
let config = rocket::Config {
|
||||||
ident: rocket::config::Ident::none(),
|
ident: rocket::config::Ident::none(),
|
||||||
ip_header: None,
|
ip_header: None,
|
||||||
|
limits: Limits::default().limit("json", 10_i32.mebibytes()),
|
||||||
port: utils::get_app_port(),
|
port: utils::get_app_port(),
|
||||||
..rocket::Config::debug_default()
|
..rocket::Config::debug_default()
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue