Skip to content

Commit

Permalink
#1984: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxnflaxl committed Jun 22, 2024
1 parent 95f8971 commit 00003cf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions explorer/adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ class Adapter : public Node::IObserver, public IAdapter {

static json get_AssetOwner(const Asset::CreateInfo& ai)
{
return (ai.m_Cid != Zero) ?
return (ai.m_Cid != Zero) ?
MakeObjCid(ai.m_Cid) :
MakeObjBlob(ai.m_Owner);
}
Expand Down Expand Up @@ -2182,15 +2182,15 @@ class Adapter : public Node::IObserver, public IAdapter {
void OnHdrs_ContractCalls_Rel(json& j) { j.push_back(MakeTableHdr("ContractCalls")); }
void OnHdrs_ContractCalls_Rel(json& j, const Totals& t1, const Totals& t0, const Block::SystemState::Full&) { j.push_back(MakeDecimalDelta(t1.m_Contract.get_Sum() - t0.m_Contract.get_Sum()).m_sz); }

static uint64_t get_ChainSize(Height h, const Totals& t, bool bArchieve)
static uint64_t get_ChainSize(Height h, const Totals& t, bool bArchive)
{
// size estimation
uint64_t ret =
static_cast<uint64_t>(sizeof(Block::SystemState::Sequence::Element)) * (h - Rules::HeightGenesis + 1) +
t.m_Kernels.m_Size +
t.m_MW.m_Outputs.m_Size;

if (bArchieve)
if (bArchive)
ret += t.m_MW.m_Inputs.m_Count * sizeof(ECC::Point);
else
ret -= t.m_MW.m_Inputs.m_Size;
Expand All @@ -2199,10 +2199,10 @@ class Adapter : public Node::IObserver, public IAdapter {
}


void OnHdrs_SizeArchieve_Abs(json& j) { j.push_back(MakeTableHdr("Size.Archieve")); }
void OnHdrs_SizeArchieve_Abs(json& j, const Totals& t1, const Block::SystemState::Full& s) { j.push_back(MakeDecimal(get_ChainSize(s.m_Height, t1, true)).m_sz); }
void OnHdrs_SizeArchieve_Rel(json& j) { j.push_back(MakeTableHdr("D.Size.Archieve")); }
void OnHdrs_SizeArchieve_Rel(json& j, const Totals& t1, const Totals& t0, const Block::SystemState::Full& s) { j.push_back(MakeDecimalDelta(get_ChainSize(s.m_Height, t1, true) - get_ChainSize(s.m_Height - 1, t0, true)).m_sz); }
void OnHdrs_SizeArchive_Abs(json& j) { j.push_back(MakeTableHdr("Size.Archive")); }
void OnHdrs_SizeArchive_Abs(json& j, const Totals& t1, const Block::SystemState::Full& s) { j.push_back(MakeDecimal(get_ChainSize(s.m_Height, t1, true)).m_sz); }
void OnHdrs_SizeArchive_Rel(json& j) { j.push_back(MakeTableHdr("D.Size.Archive")); }
void OnHdrs_SizeArchive_Rel(json& j, const Totals& t1, const Totals& t0, const Block::SystemState::Full& s) { j.push_back(MakeDecimalDelta(get_ChainSize(s.m_Height, t1, true) - get_ChainSize(s.m_Height - 1, t0, true)).m_sz); }

void OnHdrs_SizeCompressed_Abs(json& j) { j.push_back(MakeTableHdr("Size.Compressed")); }
void OnHdrs_SizeCompressed_Abs(json& j, const Totals& t1, const Block::SystemState::Full& s) { j.push_back(MakeDecimal(get_ChainSize(s.m_Height, t1, false)).m_sz); }
Expand Down
2 changes: 1 addition & 1 deletion explorer/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using nlohmann::json;
macro(ShInputs) \
macro(ContractsActive) \
macro(ContractCalls) \
macro(SizeArchieve) \
macro(SizeArchive) \
macro(SizeCompressed) \

namespace explorer {
Expand Down
2 changes: 1 addition & 1 deletion explorer/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ bool ReadColFlags(const HttpUrl& url, uint32_t& res, const char* szArg)
case 'c': res |= F::ContractsActive; break;
case 'C': res |= F::ContractCalls; break;
case 's': res |= F::SizeCompressed; break;
case 'S': res |= F::SizeArchieve; break;
case 'S': res |= F::SizeArchive; break;
}
}

Expand Down

0 comments on commit 00003cf

Please sign in to comment.