@@ -65,7 +65,7 @@ pub(crate) struct RequestResultCache {
6565 LruMap < Hash , Vec < ( SessionIndex , CandidateHash , vstaging:: slashing:: PendingSlashes ) > > ,
6666 key_ownership_proof :
6767 LruMap < ( Hash , ValidatorId ) , Option < vstaging:: slashing:: OpaqueKeyOwnershipProof > > ,
68- disabled_validators : LruCache < Hash , Vec < ValidatorIndex > > ,
68+ disabled_validators : LruMap < Hash , Vec < ValidatorIndex > > ,
6969
7070 staging_para_backing_state : LruMap < ( Hash , ParaId ) , Option < vstaging:: BackingState > > ,
7171 staging_async_backing_params : LruMap < Hash , vstaging:: AsyncBackingParams > ,
@@ -98,7 +98,7 @@ impl Default for RequestResultCache {
9898 disputes : LruMap :: new ( ByLength :: new ( DEFAULT_CACHE_CAP ) ) ,
9999 unapplied_slashes : LruMap :: new ( ByLength :: new ( DEFAULT_CACHE_CAP ) ) ,
100100 key_ownership_proof : LruMap :: new ( ByLength :: new ( DEFAULT_CACHE_CAP ) ) ,
101- disabled_validators : LruCache :: new ( DEFAULT_CACHE_CAP ) ,
101+ disabled_validators : LruMap :: new ( ByLength :: new ( DEFAULT_CACHE_CAP ) ) ,
102102
103103 staging_para_backing_state : LruMap :: new ( ByLength :: new ( DEFAULT_CACHE_CAP ) ) ,
104104 staging_async_backing_params : LruMap :: new ( ByLength :: new ( DEFAULT_CACHE_CAP ) ) ,
@@ -440,15 +440,15 @@ impl RequestResultCache {
440440 & mut self ,
441441 relay_parent : & Hash ,
442442 ) -> Option < & Vec < ValidatorIndex > > {
443- self . disabled_validators . get ( relay_parent)
443+ self . disabled_validators . get ( relay_parent) . map ( |v| & * v )
444444 }
445445
446446 pub ( crate ) fn cache_disabled_validators (
447447 & mut self ,
448448 relay_parent : Hash ,
449449 disabled_validators : Vec < ValidatorIndex > ,
450450 ) {
451- self . disabled_validators . put ( relay_parent, disabled_validators) ;
451+ self . disabled_validators . insert ( relay_parent, disabled_validators) ;
452452 }
453453
454454 pub ( crate ) fn staging_para_backing_state (
0 commit comments