Move fields from Ledger to LedgerInfo.

This commit is contained in:
Tom Ritchford
2015-07-08 12:12:48 -04:00
committed by Vinnie Falco
parent 1b6c707abb
commit c7ebe7205c
33 changed files with 548 additions and 593 deletions

View File

@@ -18,6 +18,7 @@
//==============================================================================
#include <BeastConfig.h>
#include <ripple/ledger/ReadView.h>
#include <ripple/ledger/View.h>
#include <ripple/basics/contract.h>
#include <ripple/basics/Log.h>
@@ -73,6 +74,19 @@ getFees (ReadView const& view,
//------------------------------------------------------------------------------
void addRaw (LedgerInfo const& info, Serializer& s)
{
s.add32 (info.seq);
s.add64 (info.drops);
s.add256 (info.parentHash);
s.add256 (info.txHash);
s.add256 (info.accountHash);
s.add32 (info.parentCloseTime);
s.add32 (info.closeTime);
s.add8 (info.closeTimeResolution);
s.add8 (info.closeFlags);
}
bool
isGlobalFrozen (ReadView const& view,
AccountID const& issuer)
@@ -349,7 +363,7 @@ cdirFirst (ReadView const& view,
return cdirNext (view, uRootIndex, sleNode, uDirEntry, uEntryIndex);
}
bool
bool
cdirNext (ReadView const& view,
uint256 const& uRootIndex, // --> Root of directory
std::shared_ptr<SLE const>& sleNode, // <-> current node
@@ -476,7 +490,7 @@ dirFirst (ApplyView& view,
return dirNext (view, uRootIndex, sleNode, uDirEntry, uEntryIndex);
}
bool
bool
dirNext (ApplyView& view,
uint256 const& uRootIndex, // --> Root of directory
std::shared_ptr<SLE>& sleNode, // <-> current node