mirror of
https://github.com/wownero/cyberwow.git
synced 2026-12-03 13:43:59 +01:00
add count to pool and peers
This commit is contained in:
@@ -139,6 +139,9 @@ Future<List<dynamic>> getConnectionsSimple() async {
|
||||
'current_download',
|
||||
'current_upload',
|
||||
'rpc_credits_per_hash',
|
||||
'state',
|
||||
'recv_idle_time',
|
||||
'send_idle_time',
|
||||
];
|
||||
|
||||
final _filteredConn = x..removeWhere
|
||||
|
||||
@@ -141,9 +141,20 @@ Widget rpcView(BuildContext context, String title, dynamic body) {
|
||||
}
|
||||
|
||||
Widget getInfo(BuildContext context, SyncedState state) => rpcView(context, 'info', state.getInfo);
|
||||
Widget getConnections(BuildContext context, SyncedState state) => rpcView(context, 'connections', state.getConnections);
|
||||
Widget syncInfo(BuildContext context, SyncedState state) => rpcView(context, 'sync info', state.syncInfo);
|
||||
Widget getTransactionPool(BuildContext context, SyncedState state) => rpcView(context, 'tx pool', state.getTransactionPool);
|
||||
|
||||
Widget getTransactionPool(BuildContext context, SyncedState state) {
|
||||
final pool = state.getTransactionPool;
|
||||
final subTitle = pool.isEmpty ? '' : ' ‹${pool.length}›';
|
||||
return rpcView(context, 'tx pool' + subTitle, pool);
|
||||
}
|
||||
|
||||
Widget getConnections(BuildContext context, SyncedState state) {
|
||||
final peers = state.getConnections;
|
||||
final subTitle = peers.isEmpty ? '' : ' ‹${peers.length}›';
|
||||
return rpcView(context, 'peers' + subTitle, peers);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Widget terminalView(BuildContext context, String title, SyncedState state) {
|
||||
|
||||
Reference in New Issue
Block a user