Remove duplicate types.

This commit is contained in:
Tom Ritchford
2015-05-28 13:50:47 -04:00
parent fd03c3297c
commit f1a1ef49d5
3 changed files with 5 additions and 42 deletions

View File

@@ -891,7 +891,7 @@ public:
valSeq () : valCount_ (0), ledgerSeq_ (0) { ; }
void mergeValidation (LedgerSeq seq)
void mergeValidation (LedgerIndex seq)
{
valCount_++;
@@ -901,7 +901,7 @@ public:
}
int valCount_;
LedgerSeq ledgerSeq_;
LedgerIndex ledgerSeq_;
};
// Count the number of current, trusted validations
@@ -912,9 +912,9 @@ public:
vs.mergeValidation (v->getFieldU32 (sfLedgerSequence));
}
int neededValidations = getNeededValidations ();
LedgerSeq maxSeq = mValidLedgerSeq;
uint256 maxLedger = ledger->getHash();
auto neededValidations = getNeededValidations ();
auto maxSeq = mValidLedgerSeq.load();
auto maxLedger = ledger->getHash();
// Of the ledgers with sufficient validations,
// find the one with the highest sequence

View File

@@ -1,34 +0,0 @@
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#ifndef RIPPLE_PROTOCOL_BLOB_H_INCLUDED
#define RIPPLE_PROTOCOL_BLOB_H_INCLUDED
#include <vector>
namespace ripple {
/** Storage for linear binary data.
Blocks of binary data appear often in various idioms and structures.
*/
using Blob = std::vector <unsigned char>;
}
#endif

View File

@@ -58,10 +58,7 @@ public:
};
/** A ledger index. */
// VFALCO TODO pick one. I like Index since its not an abbreviation
using LedgerIndex = std::uint32_t;
// VFALCO NOTE "LedgerSeq" appears in some SQL statement text
using LedgerSeq = std::uint32_t;
/** A transaction identifier.
The value is computed as the hash of the