Hush DPoW knows how to spell, lulz
This commit is contained in:
@@ -1765,7 +1765,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
pcoinsdbview = new CCoinsViewDB(nCoinDBCache, false, fReindex);
|
pcoinsdbview = new CCoinsViewDB(nCoinDBCache, false, fReindex);
|
||||||
pcoinscatcher = new CCoinsViewErrorCatcher(pcoinsdbview);
|
pcoinscatcher = new CCoinsViewErrorCatcher(pcoinsdbview);
|
||||||
pcoinsTip = new CCoinsViewCache(pcoinscatcher);
|
pcoinsTip = new CCoinsViewCache(pcoinscatcher);
|
||||||
pnotarisations = new NotarisationDB(100*1024*1024, false, fReindex);
|
pnotarisations = new NotarizationDB(100*1024*1024, false, fReindex);
|
||||||
|
|
||||||
|
|
||||||
if (fReindex) {
|
if (fReindex) {
|
||||||
|
|||||||
@@ -2908,7 +2908,7 @@ static bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const CO
|
|||||||
|
|
||||||
void ConnectNotarizations(const CBlock &block, int height)
|
void ConnectNotarizations(const CBlock &block, int height)
|
||||||
{
|
{
|
||||||
NotarisationsInBlock notarisations = ScanBlockNotarisations(block, height);
|
NotarisationsInBlock notarisations = ScanBlockNotarizations(block, height);
|
||||||
if (notarisations.size() > 0) {
|
if (notarisations.size() > 0) {
|
||||||
CDBBatch batch = CDBBatch(*pnotarisations);
|
CDBBatch batch = CDBBatch(*pnotarisations);
|
||||||
batch.Write(block.GetHash(), notarisations);
|
batch.Write(block.GetHash(), notarisations);
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
|
|
||||||
NotarisationDB *pnotarisations;
|
NotarizationDB *pnotarisations;
|
||||||
NotarisationDB::NotarisationDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapper(GetDataDir() / "notarizations", nCacheSize, fMemory, fWipe, false, 64) { }
|
NotarizationDB::NotarizationDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapper(GetDataDir() / "notarizations", nCacheSize, fMemory, fWipe, false, 64) { }
|
||||||
|
|
||||||
NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight)
|
NotarisationsInBlock ScanBlockNotarizations(const CBlock &block, int nHeight)
|
||||||
{
|
{
|
||||||
EvalRef eval;
|
EvalRef eval;
|
||||||
NotarisationsInBlock vNotarisations;
|
NotarisationsInBlock vNotarisations;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ extern NotarisationDB *pnotarisations;
|
|||||||
typedef std::pair<uint256,NotarisationData> Notarisation;
|
typedef std::pair<uint256,NotarisationData> Notarisation;
|
||||||
typedef std::vector<Notarisation> NotarisationsInBlock;
|
typedef std::vector<Notarisation> NotarisationsInBlock;
|
||||||
|
|
||||||
NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight);
|
NotarisationsInBlock ScanBlockNotarizations(const CBlock &block, int nHeight);
|
||||||
bool GetBlockNotarisations(uint256 blockHash, NotarisationsInBlock &nibs);
|
bool GetBlockNotarisations(uint256 blockHash, NotarisationsInBlock &nibs);
|
||||||
bool GetBackNotarisation(uint256 notarisationHash, Notarisation &n);
|
bool GetBackNotarisation(uint256 notarisationHash, Notarisation &n);
|
||||||
void WriteBackNotarisations(const NotarisationsInBlock notarisations, CDBBatch &batch);
|
void WriteBackNotarisations(const NotarisationsInBlock notarisations, CDBBatch &batch);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ void setupChain()
|
|||||||
pblocktree = new CBlockTreeDB(1 << 20, true);
|
pblocktree = new CBlockTreeDB(1 << 20, true);
|
||||||
CCoinsViewDB *pcoinsdbview = new CCoinsViewDB(1 << 23, true);
|
CCoinsViewDB *pcoinsdbview = new CCoinsViewDB(1 << 23, true);
|
||||||
pcoinsTip = new CCoinsViewCache(pcoinsdbview);
|
pcoinsTip = new CCoinsViewCache(pcoinsdbview);
|
||||||
pnotarisations = new NotarisationDB(1 << 20, true);
|
pnotarisations = new NotarizationDB(1 << 20, true);
|
||||||
InitBlockIndex();
|
InitBlockIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user