From 52b9caea5be831ecfcf2ef87cc070d78f50d77c7 Mon Sep 17 00:00:00 2001 From: lalanza808 Date: Sat, 4 Apr 2020 00:58:40 -0700 Subject: [PATCH] template improvement and commenting json structs` --- src/data_types.rs | 34 ++++++++++++++++++++++++++++++++++ templates/index.html.tera | 8 ++++---- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/data_types.rs b/src/data_types.rs index 9b46049..686a6e0 100644 --- a/src/data_types.rs +++ b/src/data_types.rs @@ -176,5 +176,39 @@ pub struct Transactions { pub receive_time: i64, pub relayed: bool, pub tx_blob: String, + pub tx_json: String, pub weight: u32 } + +// #[derive(Serialize, Deserialize, Hash, Eq, PartialEq, Debug)] +// pub struct TransactionJSON { +// pub version: u32, +// pub unlock_time: u64, +// pub vin: TransactionInputs, +// pub vout: TransactionOutputs, +// pub extra: String, +// pub signatures: Vec +// } +// +// #[derive(Serialize, Deserialize, Hash, Eq, PartialEq, Debug)] +// pub struct TransactionInputs { +// pub pubkey: PreviousTransactionKey +// } +// +// #[derive(Serialize, Deserialize, Hash, Eq, PartialEq, Debug)] +// pub struct PreviousTransactionKey { +// pub amount: u32, +// pub key_offsets: Vec, +// pub k_image: String +// } +// +// #[derive(Serialize, Deserialize, Hash, Eq, PartialEq, Debug)] +// pub struct TransactionOutputs { +// pub amount: u32, +// pub target: OutputStealthAddress +// } +// +// #[derive(Serialize, Deserialize, Hash, Eq, PartialEq, Debug)] +// pub struct OutputStealthAddress { +// pub key: String +// } diff --git a/templates/index.html.tera b/templates/index.html.tera index 6a5b2a7..b536981 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -46,7 +46,7 @@
-

Transactions

+

Transaction Count

{{ daemon_info.tx_count }}

@@ -54,9 +54,9 @@
-

Mempool Size

+

Database Size

-

{{ daemon_info.tx_pool_size }}

+

{{ daemon_info.database_size / 1000000000 }} GB

@@ -83,7 +83,7 @@
- +

Transaction Pool

Transaction Pool ({{ daemon_info.tx_pool_size }})

Hash Amount