Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ripple calc #410

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Respond to comments
  • Loading branch information
rec committed Jun 24, 2014
commit 04edc129daa151f8a45adb1273f56b93ff5796ee
9 changes: 0 additions & 9 deletions src/ripple/module/app/ledger/LedgerEntrySet.cpp
Original file line number Diff line number Diff line change
@@ -47,15 +47,6 @@ LedgerEntrySet LedgerEntrySet::duplicate () const
return LedgerEntrySet (mLedger, mEntries, mSet, mSeq + 1);
}

void LedgerEntrySet::setTo (const LedgerEntrySet& e)
{
mLedger = e.mLedger;
mEntries = e.mEntries;
mSet = e.mSet;
mParams = e.mParams;
mSeq = e.mSeq;
}

void LedgerEntrySet::swapWith (LedgerEntrySet& e)
{
std::swap (mLedger, e.mLedger);
14 changes: 7 additions & 7 deletions src/ripple/module/app/ledger/LedgerEntrySet.h
Original file line number Diff line number Diff line change
@@ -26,17 +26,20 @@ enum TransactionEngineParams
{
tapNONE = 0x00,

tapNO_CHECK_SIGN = 0x01, // Signature already checked
// Signature already checked
tapNO_CHECK_SIGN = 0x01,

tapOPEN_LEDGER = 0x10,
// Transaction is running against an open ledger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that it was partially that way already, but putting the comment under the value is confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

// true = failures are not forwarded, check transaction fee
// false = debit ledger for consumed funds
tapOPEN_LEDGER = 0x10,

tapRETRY = 0x20, // This is not the transaction's last pass
// This is not the transaction's last pass
// Transaction can be retried, soft failures allowed
tapRETRY = 0x20,

tapADMIN = 0x400, // Transaction came from a privileged source
// Transaction came from a privileged source
tapADMIN = 0x400,
};

enum LedgerEntryAction
@@ -104,9 +107,6 @@ class LedgerEntrySet
// Make a duplicate of this set.
LedgerEntrySet duplicate () const;

// Set this set to have the same contents as another
void setTo (const LedgerEntrySet&);

// Swap the contents of two sets
void swapWith (LedgerEntrySet&);

4 changes: 2 additions & 2 deletions src/ripple/module/app/misc/NetworkOPs.cpp
Original file line number Diff line number Diff line change
@@ -1210,7 +1210,7 @@ class ValidationCount
{
}

bool operator> (const ValidationCount& v)
bool operator> (const ValidationCount& v) const
{
if (trustedValidations > v.trustedValidations)
return true;
@@ -1344,7 +1344,7 @@ bool NetworkOPsImp::checkLastClosedLedger (const Overlay::PeerSequence& peerList
// 3) Is there a network ledger we'd like to switch to? If so, do we have it?
bool switchLedgers = false;

for (auto& it: ledgers)
for (auto const& it: ledgers)
{
m_journal.debug << "L: " << it.first
<< " t=" << it.second.trustedValidations
1 change: 1 addition & 0 deletions src/ripple/module/data/protocol/SerializedObject.h
Original file line number Diff line number Diff line change
@@ -197,6 +197,7 @@ class STObject
std::uint32_t getFieldU32 (SField::ref field) const;
std::uint64_t getFieldU64 (SField::ref field) const;
uint128 getFieldH128 (SField::ref field) const;

uint160 getFieldH160 (SField::ref field) const;
uint256 getFieldH256 (SField::ref field) const;
RippleAddress getFieldAccount (SField::ref field) const;