gitlab.com/SkynetLabs/skyd@v1.6.9/skymodules/renter/hostdb/README.md (about) 1 # HostDB 2 Coming Soon... 3 4 ## Weight Function 5 The hostdb gets initialized with an allowance that can be modified. The 6 allowance is used to build a weight function that the hosttree depends on to 7 determine the weight of a host. Currently, `managedCalculateHostWeightFn` is 8 used to create a `hosttree.WeightFunc` for the hostdb. The weight function that 9 is returned accesses fields of the hostdb when called to calculate a weight for 10 an entry. This means that the hostdb lock must be held when calling the weight 11 function.