Adding debug dump functions.
This commit is contained in:
parent
ba5829d927
commit
60d2ff41dc
2 changed files with 13 additions and 0 deletions
|
@ -2786,6 +2786,18 @@ rai::checksum rai::ledger::checksum (rai::account const & begin_a, rai::account
|
|||
return result;
|
||||
}
|
||||
|
||||
void rai::ledger::dump_account_chain (rai::account const & account_a)
|
||||
{
|
||||
auto hash (latest (account_a));
|
||||
while (!hash.is_zero ())
|
||||
{
|
||||
auto block (store.block_get (hash));
|
||||
assert (block != nullptr);
|
||||
std::cerr << hash.to_string () << std::endl;
|
||||
hash = block->previous ();
|
||||
}
|
||||
}
|
||||
|
||||
void rai::ledger::checksum_update (rai::block_hash const & hash_a)
|
||||
{
|
||||
rai::checksum value;
|
||||
|
|
|
@ -598,6 +598,7 @@ namespace rai
|
|||
void move_representation (rai::account const &, rai::account const &, rai::uint128_t const &);
|
||||
void checksum_update (rai::block_hash const &);
|
||||
rai::checksum checksum (rai::account const &, rai::account const &);
|
||||
void dump_account_chain (rai::account const &);
|
||||
rai::block_store & store;
|
||||
std::function <void (rai::send_block const &, rai::account const &, rai::amount const &)> send_observer;
|
||||
std::function <void (rai::receive_block const &, rai::account const &, rai::amount const &)> receive_observer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue