Validators update, add LeakChecked to Source subclasses

This commit is contained in:
Vinnie Falco
2013-10-03 15:54:36 -07:00
parent 06189b2584
commit a1b958eaac
19 changed files with 18 additions and 27 deletions

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_SOURCE_H_INCLUDED
#define RIPPLE_VALIDATORS_SOURCE_H_INCLUDED
@@ -25,7 +24,7 @@ namespace ripple {
namespace Validators {
/** A source of validator descriptors. */
class Source
class Source : public SharedObject
{
public:
/** A Source's descriptor for a Validator. */

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_TYPES_H_INCLUDED
#define RIPPLE_VALIDATORS_TYPES_H_INCLUDED

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_CHOSENLIST_H_INCLUDED
#define RIPPLE_VALIDATORS_CHOSENLIST_H_INCLUDED

View File

@@ -293,7 +293,8 @@ public:
{
SharedState::Access state (m_state);
SourceDesc& desc (*state->sources.emplace_back ());
state->sources.resize (state->sources.size() + 1);
SourceDesc& desc (state->sources.back());
desc.source = source;
m_store.insert (desc);
}
@@ -409,7 +410,7 @@ public:
/** Perform a fetch on the source. */
void fetch (SourceDesc& desc)
{
m_journal.info << "fetch ('" << desc.source->name() << "')";
m_journal.info << "fetch " << desc.source->name();
Source::Result result (desc.source->fetch (m_journal));

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
namespace ripple {
namespace Validators {

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_SOURCEDESC_H_INCLUDED
#define RIPPLE_VALIDATORS_SOURCEDESC_H_INCLUDED
@@ -34,7 +33,7 @@ struct SourceDesc
statusFailed
};
ScopedPointer <Source> source;
SharedPtr <Source> source;
Status status;
Time whenToFetch;
int numberOfFailures;
@@ -64,7 +63,7 @@ struct SourceDesc
}
};
typedef DynamicList <SourceDesc> SourcesType;
typedef std::vector <SourceDesc> SourcesType;
}
}

View File

@@ -17,11 +17,12 @@
*/
//==============================================================================
namespace ripple {
namespace Validators {
class SourceFileImp : public SourceFile
class SourceFileImp
: public SourceFile
, public LeakChecked <SourceFileImp>
{
public:
SourceFileImp (File const& file)

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_SOURCEFILE_H_INCLUDED
#define RIPPLE_VALIDATORS_SOURCEFILE_H_INCLUDED

View File

@@ -17,11 +17,12 @@
*/
//==============================================================================
namespace ripple {
namespace Validators {
class SourceStringsImp : public SourceStrings
class SourceStringsImp
: public SourceStrings
, public LeakChecked <SourceStringsImp>
{
public:
SourceStringsImp (

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_SOURCESTRINGS_H_INCLUDED
#define RIPPLE_VALIDATORS_SOURCESTRINGS_H_INCLUDED

View File

@@ -17,11 +17,12 @@
*/
//==============================================================================
namespace ripple {
namespace Validators {
class SourceURLImp : public SourceURL
class SourceURLImp
: public SourceURL
, public LeakChecked <SourceURLImp>
{
public:
explicit SourceURLImp (URL const& url)

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_SOURCEURL_H_INCLUDED
#define RIPPLE_VALIDATORS_SOURCEURL_H_INCLUDED

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_STORE_H_INCLUDED
#define RIPPLE_VALIDATORS_STORE_H_INCLUDED

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
namespace ripple {
namespace Validators {

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_STORESQDB_H_INCLUDED
#define RIPPLE_VALIDATORS_STORESQDB_H_INCLUDED
@@ -25,7 +24,9 @@ namespace ripple {
namespace Validators {
/** Database persistence for Validators using SQLite */
class StoreSqdb : public Store
class StoreSqdb
: public Store
, public LeakChecked <StoreSqdb>
{
public:
explicit StoreSqdb (Journal journal = Journal());

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
namespace ripple {
namespace Validators {

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
namespace ripple {
namespace Validators {

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#include "BeastConfig.h"
#include "ripple_validators.h"

View File

@@ -17,7 +17,6 @@
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_H_INCLUDED
#define RIPPLE_VALIDATORS_H_INCLUDED