Remove application dependency from SyncFilters

This commit is contained in:
Miguel Portilla
2016-10-12 15:22:51 -04:00
committed by Brad Chase
parent cdaafeb4b6
commit 19258cf980
15 changed files with 148 additions and 96 deletions

View File

@@ -1779,17 +1779,18 @@ LedgerMaster::addFetchPack (
fetch_packs_.canonicalize (hash, data);
}
bool
boost::optional<Blob>
LedgerMaster::getFetchPack (
uint256 const& hash,
Blob& data)
uint256 const& hash)
{
if (!fetch_packs_.retrieve (hash, data))
return false;
fetch_packs_.del (hash, false);
return hash == sha512Half(makeSlice(data));
Blob data;
if (fetch_packs_.retrieve(hash, data))
{
fetch_packs_.del(hash, false);
if (hash == sha512Half(makeSlice(data)))
return data;
}
return boost::none;
}
void