Remove some dead code that was in my way.

This commit is contained in:
JoelKatz
2012-09-11 14:51:13 -07:00
parent 81cd4cf820
commit ca1436ac25
8 changed files with 6 additions and 22 deletions

View File

@@ -80,8 +80,7 @@ Ledger::pointer LedgerMaster::closeLedger()
return closingLedger;
}
TER LedgerMaster::doTransaction(const SerializedTransaction& txn, uint32 targetLedger,
TransactionEngineParams params)
TER LedgerMaster::doTransaction(const SerializedTransaction& txn, TransactionEngineParams params)
{
TER result = mEngine.applyTransaction(txn, params);
theApp->getOPs().pubTransaction(mEngine.getLedger(), txn, result);

View File

@@ -45,8 +45,7 @@ public:
void runStandAlone() { mFinalizedLedger = mCurrentLedger; }
TER doTransaction(const SerializedTransaction& txn, uint32 targetLedger,
TransactionEngineParams params);
TER doTransaction(const SerializedTransaction& txn, TransactionEngineParams params);
void pushLedger(Ledger::ref newLedger);
void pushLedger(Ledger::ref newLCL, Ledger::ref newOL);

View File

@@ -93,7 +93,7 @@ Transaction::pointer NetworkOPs::submitTransaction(const Transaction::pointer& t
return tpTransNew;
}
Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans, uint32 tgtLedger, Peer* source)
Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans, Peer* source)
{
Transaction::pointer dbtx = theApp->getMasterTransaction().fetch(trans->getID(), true);
if (dbtx) return dbtx;
@@ -105,7 +105,7 @@ Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans,
return trans;
}
TER r = mLedgerMaster->doTransaction(*trans->getSTransaction(), tgtLedger, tapOPEN_LEDGER);
TER r = mLedgerMaster->doTransaction(*trans->getSTransaction(), tapOPEN_LEDGER);
if (r == tefFAILURE) throw Fault(IO_ERROR);
if (r == terPRE_SEQ)
@@ -140,7 +140,6 @@ Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans,
tx.set_rawtransaction(&s.getData().front(), s.getLength());
tx.set_status(newcoin::tsCURRENT);
tx.set_receivetimestamp(getNetworkTimeNC());
tx.set_ledgerindexpossible(trans->getLedger());
PackedMessage::pointer packet = boost::make_shared<PackedMessage>(tx, newcoin::mtTRANSACTION);
theApp->getConnectionPool().relayMessage(source, packet);
@@ -157,7 +156,6 @@ Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans,
tx.set_rawtransaction(&s.getData().front(), s.getLength());
tx.set_status(newcoin::tsCURRENT);
tx.set_receivetimestamp(getNetworkTimeNC());
tx.set_ledgerindexpossible(tgtLedger);
PackedMessage::pointer packet = boost::make_shared<PackedMessage>(tx, newcoin::mtTRANSACTION);
theApp->getConnectionPool().relayMessage(source, packet);
}

View File

@@ -116,8 +116,7 @@ public:
//
Transaction::pointer submitTransaction(const Transaction::pointer& tpTrans);
Transaction::pointer processTransaction(Transaction::pointer transaction, uint32 targetLedger = 0,
Peer* source = NULL);
Transaction::pointer processTransaction(Transaction::pointer transaction, Peer* source = NULL);
Transaction::pointer findTransactionByID(const uint256& transactionID);
int findTransactionsBySource(const uint256& uLedger, std::list<Transaction::pointer>&, const NewcoinAddress& sourceAccount,
uint32 minSeq, uint32 maxSeq);

View File

@@ -702,13 +702,7 @@ void Peer::recvTransaction(newcoin::TMTransaction& packet)
}
#endif
uint32 targetLedger = 0;
if (packet.has_ledgerindexfinal())
targetLedger = packet.ledgerindexfinal();
else if (packet.has_ledgerindexpossible())
targetLedger = packet.ledgerindexpossible();
tx = theApp->getOPs().processTransaction(tx, targetLedger, this);
tx = theApp->getOPs().processTransaction(tx, this);
if(tx->getStatus() != INCLUDED)
{ // transaction wasn't accepted into ledger

View File

@@ -106,7 +106,6 @@ enum SOE_Field
sfTakerGets,
sfTakerPays,
sfTarget,
sfTargetLedger,
sfTransferRate,
sfVersion,
sfWalletLocator,

View File

@@ -281,7 +281,6 @@ public:
STAmount getAmount() const { return mTransaction->getITFieldU64(sfAmount); }
STAmount getFee() const { return mTransaction->getTransactionFee(); }
uint32 getFromAccountSeq() const { return mTransaction->getSequence(); }
uint32 getSourceLedger() const { return mTransaction->getITFieldU32(sfTargetLedger); }
uint32 getIdent() const { return mTransaction->getITFieldU32(sfSourceTag); }
std::vector<unsigned char> getSignature() const { return mTransaction->getSignature(); }
uint32 getLedger() const { return mInLedger; }

View File

@@ -69,9 +69,6 @@ message TMTransaction {
required bytes rawTransaction = 1;
required TransactionStatus status = 2;
optional uint64 receiveTimestamp = 3;
optional uint32 ledgerIndexPossible = 4; // the node may not know
optional uint32 ledgerIndexFinal = 5;
optional bytes conflictingTransaction = 6;
}