29 namespace graphene {
namespace chain {
36 template<
typename Component >
37 void add( Component who, uint64_t votes )
44 bitshift = std::max(int8_t(boost::multiprecision::detail::find_msb( votes )) - 15, 0);
45 uint64_t scaled_votes = std::max( votes >> (uint8_t)
bitshift, uint64_t(1) );
46 assert( scaled_votes <= std::numeric_limits<weight_type>::max() );
48 assert(
total_votes <= std::numeric_limits<uint32_t>::max() );
59 assert(
total_votes <= std::numeric_limits<uint32_t>::max() );
61 weight = (weight >> 1)+1;
71 uint64_t
last_votes = std::numeric_limits<uint64_t>::max();