Some cleanups.

This commit is contained in:
JoelKatz
2012-10-17 10:23:03 -07:00
parent 67be1a8a55
commit 9ee4ec0649
4 changed files with 6 additions and 11 deletions

View File

@@ -22,10 +22,10 @@ LedgerProposal::LedgerProposal(const uint256& pLgr, uint32 seq, const uint256& t
LedgerProposal::LedgerProposal(const NewcoinAddress& naSeed, const uint256& prevLgr, LedgerProposal::LedgerProposal(const NewcoinAddress& naSeed, const uint256& prevLgr,
const uint256& position, uint32 closeTime) : const uint256& position, uint32 closeTime) :
mPreviousLedger(prevLgr), mCurrentHash(position), mCloseTime(closeTime), mProposeSeq(0) mPreviousLedger(prevLgr), mCurrentHash(position), mCloseTime(closeTime), mProposeSeq(0),
mPublicKey(NewcoinAddress::createNodePublic(naSeed)),
mPrivateKey(NewcoinAddress::createNodePrivate(naSeed))
{ {
mPublicKey = NewcoinAddress::createNodePublic(naSeed);
mPrivateKey = NewcoinAddress::createNodePrivate(naSeed);
mPeerID = mPublicKey.getNodeID(); mPeerID = mPublicKey.getNodeID();
mTime = boost::posix_time::second_clock::universal_time(); mTime = boost::posix_time::second_clock::universal_time();
} }

View File

@@ -57,10 +57,7 @@ class Uint160Data : public Data
{ {
uint160 mValue; uint160 mValue;
public: public:
Uint160Data(uint160 value) Uint160Data(uint160 value) : mValue(value) { ; }
{
mValue=value;
}
bool isUint160(){ return(true); } bool isUint160(){ return(true); }
uint160 getUint160(){ return(mValue); } uint160 getUint160(){ return(mValue); }
}; };

View File

@@ -60,10 +60,8 @@ Transaction::Transaction(
uint32 uSeq, uint32 uSeq,
const STAmount& saFee, const STAmount& saFee,
uint32 uSourceTag) : uint32 uSourceTag) :
mStatus(NEW), mResult(temUNCERTAIN) mAccountFrom(naSourceAccount), mFromPubKey(naPublicKey), mStatus(NEW), mResult(temUNCERTAIN)
{ {
mAccountFrom = naSourceAccount;
mFromPubKey = naPublicKey;
assert(mFromPubKey.isValid()); assert(mFromPubKey.isValid());
mTransaction = boost::make_shared<SerializedTransaction>(ttKind); mTransaction = boost::make_shared<SerializedTransaction>(ttKind);

View File

@@ -28,7 +28,7 @@ protected:
public: public:
TransactionMetaSet() : mLedger(0), mResult(255) { ; } TransactionMetaSet() : mLedger(0), mResult(255) { ; }
TransactionMetaSet(const uint256& txID, uint32 ledger) : mTransactionID(txID), mLedger(ledger) { ; } TransactionMetaSet(const uint256& txID, uint32 ledger) : mTransactionID(txID), mLedger(ledger), mResult(255) { ; }
TransactionMetaSet(const uint256& txID, uint32 ledger, const std::vector<unsigned char>&); TransactionMetaSet(const uint256& txID, uint32 ledger, const std::vector<unsigned char>&);
void init(const uint256& transactionID, uint32 ledger); void init(const uint256& transactionID, uint32 ledger);