mirror of
https://git.wownero.com/lza_menace/wownero-explorer.git
synced 2024-08-15 01:03:26 +00:00
fixing tx pool/index and tightening up page content
This commit is contained in:
parent
a2c4739344
commit
e7d7e45df3
6 changed files with 54 additions and 62 deletions
|
@ -159,7 +159,7 @@ pub struct GetTransactionPool {
|
|||
pub spent_key_images: Option<Vec<SpentKeyImages>>,
|
||||
pub status: String,
|
||||
pub top_hash: String,
|
||||
pub transactions: Option<Vec<Transactions>>
|
||||
pub transactions: Vec<Transactions>
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Hash, Eq, PartialEq, Debug, Clone)]
|
||||
|
|
26
src/main.rs
26
src/main.rs
|
@ -216,30 +216,22 @@ fn index() -> Template {
|
|||
&"get_info", None, true
|
||||
).send().unwrap().json().unwrap();
|
||||
|
||||
let tx_pool: GetTransactionPool = build_rpc(
|
||||
let mut tx_pool: GetTransactionPool = build_rpc(
|
||||
&"get_transaction_pool", None, true
|
||||
).send().unwrap().json().unwrap();
|
||||
|
||||
println!("{:#?}", tx_pool);
|
||||
let mut tx_json_raw: Vec<TransactionJSON> = vec![];
|
||||
|
||||
// let mut tx_pool_txs = tx_pool.transactions;
|
||||
//
|
||||
// match tx_pool_txs {
|
||||
// Some(s) => {
|
||||
// for mut f in s {
|
||||
// let mut _fp = f.process();
|
||||
// }
|
||||
// },
|
||||
// None => {}
|
||||
// };
|
||||
|
||||
// for f in &mut tx_pool.transactions {
|
||||
// f.process();
|
||||
// };
|
||||
for f in &mut tx_pool.transactions {
|
||||
f.process();
|
||||
let j: TransactionJSON = serde_json::from_str(&f.tx_json).unwrap();
|
||||
tx_json_raw.push(j)
|
||||
};
|
||||
|
||||
let context: JsonValue = json!({
|
||||
"daemon_info": daemon_info,
|
||||
"tx_pool_txs": tx_pool.transactions
|
||||
"tx_pool_txs": tx_pool.transactions,
|
||||
"tx_json": tx_json_raw
|
||||
});
|
||||
|
||||
Template::render("index", context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue