diff --git a/src/LedgerProposal.cpp b/src/LedgerProposal.cpp index a334a612f7..e7953abad5 100644 --- a/src/LedgerProposal.cpp +++ b/src/LedgerProposal.cpp @@ -22,10 +22,10 @@ LedgerProposal::LedgerProposal(const uint256& pLgr, uint32 seq, const uint256& t LedgerProposal::LedgerProposal(const NewcoinAddress& naSeed, const uint256& prevLgr, 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(); mTime = boost::posix_time::second_clock::universal_time(); } diff --git a/src/ScriptData.h b/src/ScriptData.h index 66fe2ed3e4..0e84e8f920 100644 --- a/src/ScriptData.h +++ b/src/ScriptData.h @@ -57,10 +57,7 @@ class Uint160Data : public Data { uint160 mValue; public: - Uint160Data(uint160 value) - { - mValue=value; - } + Uint160Data(uint160 value) : mValue(value) { ; } bool isUint160(){ return(true); } uint160 getUint160(){ return(mValue); } }; diff --git a/src/Transaction.cpp b/src/Transaction.cpp index 9a368c1c64..6ef87abaf7 100644 --- a/src/Transaction.cpp +++ b/src/Transaction.cpp @@ -60,10 +60,8 @@ Transaction::Transaction( uint32 uSeq, const STAmount& saFee, uint32 uSourceTag) : - mStatus(NEW), mResult(temUNCERTAIN) + mAccountFrom(naSourceAccount), mFromPubKey(naPublicKey), mStatus(NEW), mResult(temUNCERTAIN) { - mAccountFrom = naSourceAccount; - mFromPubKey = naPublicKey; assert(mFromPubKey.isValid()); mTransaction = boost::make_shared(ttKind); diff --git a/src/TransactionMeta.h b/src/TransactionMeta.h index 78f3378f5b..81b8c2a44d 100644 --- a/src/TransactionMeta.h +++ b/src/TransactionMeta.h @@ -28,7 +28,7 @@ protected: public: 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&); void init(const uint256& transactionID, uint32 ledger);