@@ -579,7 +579,7 @@ class CAddrMan
579
579
/* *
580
580
* Choose an address to connect to.
581
581
*/
582
- CAddrInfo Select (bool newOnly = false )
582
+ CAddrInfo Select (bool newOnly = false ) const
583
583
EXCLUSIVE_LOCKS_REQUIRED(!cs)
584
584
{
585
585
LOCK (cs);
@@ -631,7 +631,7 @@ class CAddrMan
631
631
uint256 nKey;
632
632
633
633
// ! Source of random numbers for randomization in inner loops
634
- FastRandomContext insecure_rand;
634
+ mutable FastRandomContext insecure_rand;
635
635
636
636
private:
637
637
// ! A mutex to protect the inner data structures.
@@ -718,7 +718,7 @@ class CAddrMan
718
718
void Attempt_ (const CService &addr, bool fCountFailure , int64_t nTime) EXCLUSIVE_LOCKS_REQUIRED(cs);
719
719
720
720
// ! Select an address to connect to, if newOnly is set to true, only the new table is selected from.
721
- CAddrInfo Select_ (bool newOnly) EXCLUSIVE_LOCKS_REQUIRED(cs);
721
+ CAddrInfo Select_ (bool newOnly) const EXCLUSIVE_LOCKS_REQUIRED(cs);
722
722
723
723
// ! See if any to-be-evicted tried table entries have been tested and if so resolve the collisions.
724
724
void ResolveCollisions_ () EXCLUSIVE_LOCKS_REQUIRED(cs);
@@ -727,7 +727,7 @@ class CAddrMan
727
727
CAddrInfo SelectTriedCollision_ () EXCLUSIVE_LOCKS_REQUIRED(cs);
728
728
729
729
// ! Consistency check
730
- void Check ()
730
+ void Check () const
731
731
EXCLUSIVE_LOCKS_REQUIRED(cs)
732
732
{
733
733
#ifdef DEBUG_ADDRMAN
@@ -741,7 +741,7 @@ class CAddrMan
741
741
742
742
#ifdef DEBUG_ADDRMAN
743
743
// ! Perform consistency check. Returns an error code or zero.
744
- int Check_ () EXCLUSIVE_LOCKS_REQUIRED(cs);
744
+ int Check_ () const EXCLUSIVE_LOCKS_REQUIRED(cs);
745
745
#endif
746
746
747
747
/* *
0 commit comments