create function to query notarisations leveldb by height

This commit is contained in:
Scott Sadler
2018-06-14 08:35:53 -03:00
parent 846384769c
commit 7f3cc8a296
4 changed files with 48 additions and 30 deletions

View File

@@ -18,7 +18,7 @@ extern NotarisationDB *pnotarisations;
typedef std::pair<uint256,NotarisationData> Notarisation;
typedef std::vector<Notarisation> NotarisationsInBlock;
NotarisationsInBlock GetNotarisationsInBlock(const CBlock &block, int nHeight);
NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight);
bool GetBlockNotarisations(uint256 blockHash, NotarisationsInBlock &nibs);
bool GetBackNotarisation(uint256 notarisationHash, Notarisation &n);
void WriteBackNotarisations(const NotarisationsInBlock notarisations, CLevelDBBatch &batch);