File tree Expand file tree Collapse file tree 5 files changed +5
-7
lines changed
Expand file tree Collapse file tree 5 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ pub struct GetChainTxStats {
417417 /// The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0.
418418 pub window_interval : Option < u32 > ,
419419 /// The average rate of transactions per second in the window. Only returned if "window_interval" is > 0.
420- pub tx_rate : Option < u32 > ,
420+ pub tx_rate : Option < f64 > ,
421421}
422422
423423/// Models the result of JSON-RPC method `getdeploymentinfo`.
Original file line number Diff line number Diff line change @@ -315,7 +315,6 @@ impl GetChainTxStats {
315315 self . window_tx_count . map ( |h| crate :: to_u32 ( h, "window_tx_count" ) ) . transpose ( ) ?;
316316 let window_interval =
317317 self . window_interval . map ( |h| crate :: to_u32 ( h, "window_interval" ) ) . transpose ( ) ?;
318- let tx_rate = self . tx_rate . map ( |h| crate :: to_u32 ( h, "tx_rate" ) ) . transpose ( ) ?;
319318
320319 Ok ( model:: GetChainTxStats {
321320 time : crate :: to_u32 ( self . time , "time" ) ?,
@@ -325,7 +324,7 @@ impl GetChainTxStats {
325324 window_block_count : crate :: to_u32 ( self . window_block_count , "window_block_count" ) ?,
326325 window_tx_count,
327326 window_interval,
328- tx_rate,
327+ tx_rate : self . tx_rate ,
329328 } )
330329 }
331330}
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ pub struct GetChainTxStats {
438438 pub window_interval : Option < i64 > ,
439439 /// The average rate of transactions per second in the window. Only returned if "window_interval" is > 0.
440440 #[ serde( rename = "txrate" ) ]
441- pub tx_rate : Option < i64 > ,
441+ pub tx_rate : Option < f64 > ,
442442}
443443
444444/// Result of JSON-RPC method `getdifficulty`.
Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ impl GetChainTxStats {
8181 self . window_tx_count . map ( |h| crate :: to_u32 ( h, "window_tx_count" ) ) . transpose ( ) ?;
8282 let window_interval =
8383 self . window_interval . map ( |h| crate :: to_u32 ( h, "window_interval" ) ) . transpose ( ) ?;
84- let tx_rate = self . tx_rate . map ( |h| crate :: to_u32 ( h, "tx_rate" ) ) . transpose ( ) ?;
8584
8685 Ok ( model:: GetChainTxStats {
8786 time : crate :: to_u32 ( self . time , "time" ) ?,
@@ -91,7 +90,7 @@ impl GetChainTxStats {
9190 window_block_count : crate :: to_u32 ( self . window_block_count , "window_block_count" ) ?,
9291 window_tx_count,
9392 window_interval,
94- tx_rate,
93+ tx_rate : self . tx_rate ,
9594 } )
9695 }
9796}
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ pub struct GetChainTxStats {
186186 pub window_interval : Option < i64 > ,
187187 /// The average rate of transactions per second in the window. Only returned if "window_interval" is > 0.
188188 #[ serde( rename = "txrate" ) ]
189- pub tx_rate : Option < i64 > ,
189+ pub tx_rate : Option < f64 > ,
190190}
191191
192192/// Result of JSON-RPC method `getmempoolancestors` with verbose set to `false`.
You can’t perform that action at this time.
0 commit comments