public void Map(long deltaNumber, Cid deltaHash) { if (!_repository.TryGet(DeltaIndexDao.BuildDocumentId((ulong)deltaNumber), out _)) { _repository.Add(new DeltaIndexDao { Height = (ulong)deltaNumber, Cid = deltaHash }); } }
public bool TryFind(long deltaNumber, out Cid deltaHash) { if (_repository.TryGet(DeltaIndexDao.BuildDocumentId((ulong)deltaNumber), out var delta)) { deltaHash = delta.Cid; return(true); } deltaHash = default; return(false); }