-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from rainshowerLabs/add-delay-reformat-serializ…
…ed-tracker-output Add delay to replaying blocks, reformat serialized tracker output
- Loading branch information
Showing
7 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "sothis" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
edition = "2021" | ||
authors = ["makemake <[email protected]>"] | ||
license = "GPL-3.0-or-later" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ pub struct AppConfig { | |
exit_on_tx_fail: bool, | ||
send_as_raw: bool, | ||
entropy_threshold: f32, | ||
replay_delay: u64, | ||
block_listen_time: u64, | ||
path: String, | ||
filename: String, | ||
|
@@ -32,7 +33,7 @@ lazy_static! { | |
#[tokio::main] | ||
async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
let matches = Command::new("sothis") | ||
.version("0.3.0") | ||
.version("0.3.1") | ||
.author("makemake <[email protected]>") | ||
.about("Tool for replaying historical transactions. Designed to be used with anvil or hardhat.") | ||
.arg(Arg::new("source_rpc") | ||
|
@@ -73,6 +74,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { | |
.num_args(1..) | ||
.default_value("0.07") | ||
.help("Set the percentage of failed transactions to trigger a warning")) | ||
.arg(Arg::new("replay_delay") | ||
.long("replay_delay") | ||
.short('d') | ||
.num_args(1..) | ||
.default_value("0") | ||
.help("Default delay for block replay in ms")) | ||
.arg(Arg::new("send_as_raw") | ||
.long("send_as_raw") | ||
.num_args(0..) | ||
|
@@ -112,6 +119,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { | |
app_config.exit_on_tx_fail = matches.get_occurrences::<String>("exit_on_tx_fail").is_some(); | ||
app_config.send_as_raw = matches.get_occurrences::<String>("send_as_raw").is_some(); | ||
app_config.entropy_threshold = matches.get_one::<String>("entropy_threshold").expect("required").parse::<f32>()?; | ||
app_config.replay_delay = matches.get_one::<String>("replay_delay").expect("required").parse::<u64>()?; | ||
app_config.block_listen_time = matches.get_one::<String>("block_listen_time").expect("required").parse::<u64>()?; | ||
app_config.path = matches.get_one::<String>("path").expect("required").to_string(); | ||
app_config.filename = matches.get_one::<String>("filename").expect("required").to_string(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters