forked from cerc-io/plugeth
3f79afb599
It's a trivial PR to hide the error log when the trie node is not found in the database. The idea for this change is for all TryXXX functions, the error is already returned and we don't need to fire a log explicitly. Recently there are a few tickets #25613 #25589 reporting that the trie nodes are missing because of debug.SetHead. The root cause is after resetting, the chain rewinds to a historical point and re-imports the blocks on top. Since the node is already synced and started to accept transactions previously, these transactions are still kept in the txpool and verified by txpool with a live state. This live state is constructed based on the live trie database, which is changed fast by node referencing and de-referencing. Unfortunately, when we construct a live state(like the state in txpool), we don't reference the state we have. The blockchain will garbage collect the intermediate version nodes in another thread which leads the broken live state. The best solution for this is to forcibly obtain a reference for all live states we create and call release function once it's used up. But it might end up with more junks persisted into disk. Will try to find an elegant solution later in the following PR. |
||
---|---|---|
.. | ||
committer.go | ||
database_test.go | ||
database.go | ||
encoding_test.go | ||
encoding.go | ||
errors.go | ||
hasher.go | ||
iterator_test.go | ||
iterator.go | ||
node_enc.go | ||
node_test.go | ||
node.go | ||
nodeset.go | ||
preimages.go | ||
proof_test.go | ||
proof.go | ||
secure_trie_test.go | ||
secure_trie.go | ||
stacktrie_test.go | ||
stacktrie.go | ||
sync_test.go | ||
sync.go | ||
trie_test.go | ||
trie.go | ||
util_test.go | ||
utils.go |