Skip to content

Commit 2e969a0

Browse files
committed
more logs when getting the cIndex for PoA
1 parent 39adef2 commit 2e969a0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

app/lib/store/encointer/sub_stores/encointer_account_store/encointer_account_store.dart

+12-3
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,18 @@ abstract class _EncointerAccountStore with Store {
8585
try {
8686
// returns the first reputation that hasn't been linked, or has been linked to a non-current cIndex.
8787
return verifiedReputations.entries.firstWhere((e) {
88-
return e.value.reputation.runtimeType == VerifiedUnlinked ||
89-
(e.value.reputation.runtimeType == VerifiedLinked &&
90-
(e.value.reputation as VerifiedLinked).value0 != currentCeremonyIndex);
88+
if (e.value.reputation.runtimeType == VerifiedUnlinked) {
89+
Log.d('Found unlinked reputation with cIndex ${e.key}');
90+
return true;
91+
}
92+
93+
if (e.value.reputation.runtimeType == VerifiedLinked &&
94+
(e.value.reputation as VerifiedLinked).value0 != currentCeremonyIndex) {
95+
Log.d('Found linked reputation that has been linked to previous cycle with cIndex ${e.key}');
96+
return true;
97+
}
98+
99+
return false;
91100
}).key;
92101
} catch (e, s) {
93102
Log.e('$address has reputation, but none that has not been linked with the current cIndex',

0 commit comments

Comments
 (0)