This commit is contained in:
jed
2011-10-28 16:51:35 -07:00
parent e68b0fb8d1
commit 7436a8deec
29 changed files with 141 additions and 129 deletions

View File

@@ -2,7 +2,8 @@
#include "Application.h"
#include "NewcoinAddress.h"
#include "Config.h"
#include "Convertion.h"
#include "Conversion.h"
#include "Application.h"
#include <boost/foreach.hpp>
using namespace std;
@@ -27,6 +28,12 @@ void ValidationCollection::load()
}
void ValidationCollection::addToDB(newcoin::Validation& valid,bool weCare)
{
Database* db=theApp->getDB();
}
bool ValidationCollection::hasValidation(uint256& ledgerHash,uint160& hanko,uint32 seqnum)
{
if(mValidations.count(ledgerHash))
@@ -69,11 +76,12 @@ void ValidationCollection::addValidation(newcoin::Validation& valid)
mValidations[hash].push_back(valid);
mIndexValidations[valid.ledgerindex()].push_back(valid);
addToGroup(valid);
addToDB(valid,true);
theApp->getLedgerMaster().checkConsensus(valid.ledgerindex());
}else if(validity==0)
{
mIgnoredValidations[hash].push_back(valid);
addToDB(valid,false);
}else
{ // the signature wasn't valid
cout << "Invalid Validation" << endl;