From fe2c0dccd827a7e80e09b84f7a70e9f137736f1b Mon Sep 17 00:00:00 2001 From: jmlee Date: Tue, 16 Jul 2019 16:09:46 +0900 Subject: [PATCH] add state tire print function --- core/state/statedb.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/state/statedb.go b/core/state/statedb.go index 4d292b25ed..5e8481648e 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -726,3 +726,10 @@ func (s *StateDB) Commit(deleteEmptyObjects bool) (root common.Hash, err error) }) return root, err } + +// Print shows all accounts in state trie (jmlee) +func (s *StateDB) Print() { + stateString := string(s.Dump(false, false, true)) + log.Info("### print state trie ###") + log.Info(stateString) +}