More pushing code around

This commit is contained in:
Dave Hrycyszyn
2024-06-07 18:42:28 +01:00
parent 9dc515fb78
commit c3f5b2890b
6 changed files with 51 additions and 54 deletions

View File

@@ -1,5 +1,7 @@
use std::path::PathBuf;
use serde_json::{json, Value};
pub(crate) const KEY_FILE: &str = "keys.pem";
pub(crate) const CONFIG_FILE: &str = "config.toml";
@@ -20,3 +22,12 @@ pub(crate) fn home(name: &String) -> std::path::PathBuf {
path.push(name);
path
}
/// Generate a fake transaction with customizable from_pubkey String
pub(crate) fn fake_transaction(from_pubkey: String) -> Value {
json!({
"from": from_pubkey,
"to": "Bob",
"amount": 1
})
}