mirror of
https://github.com/wownero/cyberwow.git
synced 2026-12-03 21:53:58 +01:00
store rpc results rather then views in state
This commit is contained in:
@@ -35,7 +35,7 @@ watch:
|
||||
|
||||
run:
|
||||
cd cyberwow && \
|
||||
flutter run --pid-file /tmp/flutter.pid
|
||||
flutter run --release --pid-file /tmp/flutter.pid
|
||||
|
||||
# clang -target aarch64-linux-android21 cyberwow/native/hello.c -o cyberwow/native/output/hello
|
||||
c:
|
||||
|
||||
+11
-9
@@ -305,21 +305,23 @@ class SyncedState extends HookedState {
|
||||
// log.finer('SyncedState: checkSync loop');
|
||||
height = await rpc.height();
|
||||
connected = await daemon.isConnected();
|
||||
final _getInfo = await rpc.getInfoSimple();
|
||||
getInfo = cleanKey(rpcView.getInfoView(_getInfo));
|
||||
getInfoCache = pretty(getInfo);
|
||||
getInfo = await rpc.getInfoSimple();
|
||||
final _getInfoView = cleanKey(rpcView.getInfoView(getInfo));
|
||||
getInfoCache = pretty(_getInfoView);
|
||||
|
||||
final List<Map<String, dynamic>> _getConnections = await rpc.getConnectionsSimple();
|
||||
getConnections = _getConnections
|
||||
getConnections = await rpc.getConnectionsSimple();
|
||||
final List<Map<String, dynamic>> _getConnectionsView =
|
||||
getConnections
|
||||
.map(rpcView.getConnectionView)
|
||||
.map((x) => rpcView.simpleHeight(height, x))
|
||||
.map(cleanKey)
|
||||
.toList();
|
||||
getConnectionsCache = pretty(getConnections);
|
||||
getConnectionsCache = pretty(_getConnectionsView);
|
||||
|
||||
final List<Map<String, dynamic>> _getTransactionPool = await rpc.getTransactionPoolSimple();
|
||||
getTransactionPool = _getTransactionPool.map(rpc2View.txView).map(cleanKey).toList();
|
||||
getTransactionPoolCache = pretty(getTransactionPool);
|
||||
getTransactionPool = await rpc.getTransactionPoolSimple();
|
||||
final List<Map<String, dynamic>> _getTransactionPoolView =
|
||||
getTransactionPool.map(rpc2View.txView).map(cleanKey).toList();
|
||||
getTransactionPoolCache = pretty(_getTransactionPoolView);
|
||||
|
||||
syncState();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ Widget summary(BuildContext context, SyncedState state) {
|
||||
final poolLength = state.getTransactionPool.length;
|
||||
final poolLengthNotice = poolLength > 1 ? '[${poolLength}] ' : '';
|
||||
final txNotice = state.getTransactionPool.isEmpty ?
|
||||
'' : poolLengthNotice + state.getTransactionPool.first['id '].substring(0, 6) + ' ...';
|
||||
'' : poolLengthNotice + state.getTransactionPool.first['id_hash'].substring(0, 6) + ' ...';
|
||||
|
||||
return Container
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user