revert previous change to bit shift

This commit is contained in:
Evan Tschannen 2020-05-20 12:32:50 -07:00
parent 5f979c0178
commit 459186dad0
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ const Endpoint& EndpointMap::insert( NetworkAddressList localAddresses, std::vec
UID base = deterministicRandom()->randomUniqueID();
for(uint64_t i=0; i<streams.size(); i++) {
int index = adjacentStart+i;
uint64_t first = (base.first()+(i<<56)) | TOKEN_STREAM_FLAG;
uint64_t first = (base.first()+(i<<32)) | TOKEN_STREAM_FLAG;
streams[i].first->setEndpoint( Endpoint( localAddresses, UID( first, (base.second()&0xffffffff00000000LL) | index) ) );
data[index].token() = Endpoint::Token( first, (base.second()&0xffffffff00000000LL) | static_cast<uint32_t>(streams[i].second) );
data[index].receiver = (NetworkMessageReceiver*) streams[i].first;

View File

@ -68,7 +68,7 @@ public:
Endpoint getAdjustedEndpoint( uint32_t index ) {
uint32_t newIndex = token.second();
newIndex += index;
return Endpoint( addresses, UID(token.first()+(uint64_t(index)<<56), (token.second()&0xffffffff00000000LL) | newIndex) );
return Endpoint( addresses, UID(token.first()+(uint64_t(index)<<32), (token.second()&0xffffffff00000000LL) | newIndex) );
}
bool operator == (Endpoint const& r) const {