mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 22:57:59 -05:00
script/research/gg: create transactions folder if it doesn't exists
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
fs::{read_dir, read_to_string},
|
fs::{create_dir, read_dir, read_to_string},
|
||||||
io::{stdin, Cursor, Read},
|
io::{stdin, Cursor, Read},
|
||||||
process::exit,
|
process::exit,
|
||||||
str::FromStr,
|
str::FromStr,
|
||||||
@@ -145,6 +145,9 @@ fn main() -> Result<()> {
|
|||||||
|
|
||||||
// Grab genesis transactions from folder
|
// Grab genesis transactions from folder
|
||||||
let txs_folder = expand_path(&txs_folder).unwrap();
|
let txs_folder = expand_path(&txs_folder).unwrap();
|
||||||
|
if !txs_folder.exists() {
|
||||||
|
create_dir(&txs_folder)?;
|
||||||
|
}
|
||||||
let mut tree = MerkleTree::new(1);
|
let mut tree = MerkleTree::new(1);
|
||||||
for file in read_dir(txs_folder)? {
|
for file in read_dir(txs_folder)? {
|
||||||
let file = file?;
|
let file = file?;
|
||||||
|
|||||||
Reference in New Issue
Block a user