Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Minor changes (formatting/logging)
Browse files Browse the repository at this point in the history
  • Loading branch information
halfalicious committed Nov 18, 2019
1 parent 190181e commit 956528b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 2 additions & 3 deletions libethereum/BlockChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ bool BlockChain::open(fs::path const& _path, WithExisting _we)
else
{
LOG(m_loggerDetail) << "Creating database minor version file: " << extrasSubPathMinor
<< " (current database minor version: " << c_databaseMinorVersion
<< ")";
<< " (minor version: " << c_databaseMinorVersion << ")";
writeFile(extrasSubPathMinor, rlp(c_databaseMinorVersion));
}
}
Expand Down Expand Up @@ -280,7 +279,7 @@ bool BlockChain::open(fs::path const& _path, WithExisting _we)
if (_we != WithExisting::Verify && !rebuildNeeded && !details(m_genesisHash))
{
bytes const genesisBlockBytes = m_params.genesisBlock();
BlockHeader gb(genesisBlockBytes);
BlockHeader gb{genesisBlockBytes};
// Insert details of genesis block.
m_details[m_genesisHash] =
BlockDetails{0 /* number */, gb.difficulty(), h256{} /* parent */, {} /* children */,
Expand Down
12 changes: 9 additions & 3 deletions libethereum/BlockDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ constexpr unsigned c_invalidNumber = (unsigned)-1;
struct BlockDetails
{
BlockDetails(): number(c_invalidNumber), totalDifficulty(Invalid256) {}
BlockDetails(unsigned _number, u256 _totalDifficulty, h256 _parentHash, h256s _childHashes, unsigned _blockSizeBytes) : number{ _number }, totalDifficulty{ _totalDifficulty }, parentHash{ _parentHash }, childHashes{ _childHashes
}, blockSizeBytes{_blockSizeBytes}{}
BlockDetails(RLP const& _r);
BlockDetails(unsigned _number, u256 _totalDifficulty, h256 _parentHash, h256s _childHashes,
unsigned _blockSizeBytes)
: number{_number},
totalDifficulty{_totalDifficulty},
parentHash{_parentHash},
childHashes{_childHashes},
blockSizeBytes{_blockSizeBytes}
{}
BlockDetails(RLP const& _r);
bytes rlp() const;

bool isNull() const { return number == c_invalidNumber; }
Expand Down

0 comments on commit 956528b

Please sign in to comment.