From 92bbc3137dfeb186a99935c3436c03871c188234 Mon Sep 17 00:00:00 2001 From: Max <63856008+Maxnflaxl@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:23:12 +0200 Subject: [PATCH] #1984: fix typo (#1987) --- explorer/adapter.cpp | 14 +++++++------- explorer/adapter.h | 2 +- explorer/server.cpp | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/explorer/adapter.cpp b/explorer/adapter.cpp index 1ea65eda9..162a38284 100644 --- a/explorer/adapter.cpp +++ b/explorer/adapter.cpp @@ -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); } @@ -2182,7 +2182,7 @@ 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 = @@ -2190,7 +2190,7 @@ class Adapter : public Node::IObserver, public IAdapter { 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; @@ -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); } diff --git a/explorer/adapter.h b/explorer/adapter.h index 1115e424b..5b61b178d 100644 --- a/explorer/adapter.h +++ b/explorer/adapter.h @@ -32,7 +32,7 @@ using nlohmann::json; macro(ShInputs) \ macro(ContractsActive) \ macro(ContractCalls) \ - macro(SizeArchieve) \ + macro(SizeArchive) \ macro(SizeCompressed) \ namespace explorer { diff --git a/explorer/server.cpp b/explorer/server.cpp index c200c048b..b3a18d224 100644 --- a/explorer/server.cpp +++ b/explorer/server.cpp @@ -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; } }