feat: Allow initializing the BTBV trust manager in the constructor

This commit is contained in:
PapaTutuWawa 2022-09-11 13:43:07 +02:00
parent ff52c82039
commit dad938b0e1

View File

@ -33,11 +33,11 @@ BTBVTrustState _trustFromInt(int i) {
/// A TrustManager that implements the idea of Blind Trust Before Verification. /// A TrustManager that implements the idea of Blind Trust Before Verification.
/// See https://gultsch.de/trust.html for more details. /// See https://gultsch.de/trust.html for more details.
abstract class BlindTrustBeforeVerificationTrustManager extends TrustManager { abstract class BlindTrustBeforeVerificationTrustManager extends TrustManager {
BlindTrustBeforeVerificationTrustManager() BlindTrustBeforeVerificationTrustManager({
: trustCache = {}, this.trustCache = const {},
enablementCache = {}, this.enablementCache = const {},
devices = {}, this.devices = const {},
_lock = Lock(); }) : _lock = Lock();
/// The cache for mapping a RatchetMapKey to its trust state /// The cache for mapping a RatchetMapKey to its trust state
@visibleForTesting @visibleForTesting