m3 test proven
This commit is contained in:
@@ -9,19 +9,18 @@
|
||||
NotarisationDB *pnotarisations;
|
||||
|
||||
|
||||
NotarisationDB::NotarisationDB(size_t nCacheSize, bool fMemory, bool fWipe) : CLevelDBWrapper(GetDataDir() / "notarisations", nCacheSize, fMemory, fWipe, false, 64) {
|
||||
}
|
||||
NotarisationDB::NotarisationDB(size_t nCacheSize, bool fMemory, bool fWipe) : CLevelDBWrapper(GetDataDir() / "notarisations", nCacheSize, fMemory, fWipe, false, 64) { }
|
||||
|
||||
|
||||
NotarisationsInBlock GetNotarisationsInBlock(const CBlock &block, int nHeight)
|
||||
{
|
||||
EvalRef eval;
|
||||
NotarisationsInBlock vNotarisations;
|
||||
bool IsBackNotarisation = ASSETCHAINS_SYMBOL[0] != 0;
|
||||
|
||||
for (unsigned int i = 0; i < block.vtx.size(); i++) {
|
||||
CTransaction tx = block.vtx[i];
|
||||
if (eval->CheckNotaryInputs(tx, nHeight, block.nTime)) {
|
||||
NotarisationData data(IsBackNotarisation);
|
||||
NotarisationData data;
|
||||
if (ParseNotarisationOpReturn(tx, data))
|
||||
vNotarisations.push_back(std::make_pair(tx.GetHash(), data));
|
||||
else
|
||||
@@ -40,7 +39,9 @@ void WriteBackNotarisations(NotarisationsInBlock notarisations)
|
||||
{
|
||||
BOOST_FOREACH(Notarisation &n, notarisations)
|
||||
{
|
||||
if (n.second.IsBackNotarisation)
|
||||
if (n.second.IsBackNotarisation) {
|
||||
pnotarisations->Write(n.second.txHash, n);
|
||||
printf("WriteBackNotarisations {\n m3:%s\n}\n", n.second.MoMoM.GetHex().data());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user