remove addref and unref

This commit is contained in:
Brooks Prumo
2021-09-16 15:17:44 -05:00
committed by Jeff Washington (jwash)
parent c80d9cb4e3
commit 2756044ee3

View File

@ -196,20 +196,6 @@ impl<T: Clone + Copy + Debug> BucketMap<T> {
0
}
}
/// Increment the refcount for Pubkey `key`
pub fn addref(&self, key: &Pubkey) -> Option<RefCount> {
let ix = self.bucket_ix(key);
let mut bucket = self.buckets[ix].write().unwrap();
bucket.as_mut()?.addref(key)
}
/// Decrement the refcount for Pubkey `key`
pub fn unref(&self, key: &Pubkey) -> Option<RefCount> {
let ix = self.bucket_ix(key);
let mut bucket = self.buckets[ix].write().unwrap();
bucket.as_mut()?.unref(key)
}
}
/// Look at the first 8 bytes of the input and reinterpret them as a u64