Skip to content

Commit

Permalink
ext tor
Browse files Browse the repository at this point in the history
  • Loading branch information
quarkonium committed Dec 18, 2017
1 parent 800ded8 commit 3a723c6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
39 changes: 20 additions & 19 deletions src/dions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6133,6 +6133,26 @@ ConnectInputsPost(map<uint256, CTxIndex>& mapTestPool,
CBlockIndex* pindexBlock, CDiskTxPos& txPos,
bool fBlock, bool fMiner)
{
if(tx.nVersion != CTransaction::DION_TX_VERSION)
{
bool found= false;
for(int i = 0; i < tx.vout.size(); i++)
{
const CTxOut& out = tx.vout[i];

std::vector<vchType> vvchRead;
int opRead;

if(aliasScript(out.scriptPubKey, opRead, vvchRead))
found=true;
}

if(found)
return error("ConnectInputsPost() : a non-dions transaction with a dions input");
return true;
}


LocatorNodeDB ln1Db("r+");
int nInput;
bool found = false;
Expand All @@ -6158,25 +6178,6 @@ ConnectInputsPost(map<uint256, CTxIndex>& mapTestPool,
vvchPrevArgs = vvchPrevArgsRead;
}
}
if(tx.nVersion != CTransaction::DION_TX_VERSION)
{

bool found= false;
for(int i = 0; i < tx.vout.size(); i++)
{
const CTxOut& out = tx.vout[i];

std::vector<vchType> vvchRead;
int opRead;

if(aliasScript(out.scriptPubKey, opRead, vvchRead))
found=true;
}

if(found)
return error("ConnectInputsPost() : a non-dions transaction with a dions input");
return true;
}

std::vector<vchType> vvchArgs;
int op;
Expand Down
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2456,8 +2456,6 @@ bool CBlock::AcceptBlock()
map<uint256, CTxIndex> mapQueuedChanges;
BOOST_FOREACH(CTransaction& tx, vtx)
{


MapPrevTx mapInputs;
if (!tx.IsCoinBase())
{
Expand Down Expand Up @@ -2531,8 +2529,11 @@ bool CBlock::AcceptBlock()
unsigned int nBlockPos = 0;
if (!WriteToDisk(nFile, nBlockPos))
return error("AcceptBlock() : WriteToDisk failed");

if (!AddToBlockIndex(nFile, nBlockPos, hashProof))
return error("AcceptBlock() : AddToBlockIndex failed");
{
return error("add : failed");
}

// Relay inventory, but don't relay old inventory during initial block download
int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate();
Expand Down

0 comments on commit 3a723c6

Please sign in to comment.