mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
fix: support a verkle pre-tree at the conversion block (#313)
* fix: support a verkle pre-tree at the conversion block * make linter happy
This commit is contained in:
parent
ac3f26947d
commit
7d02a604d7
1 changed files with 8 additions and 1 deletions
|
|
@ -418,7 +418,14 @@ func (beacon *Beacon) FinalizeAndAssemble(chain consensus.ChainHeaderReader, hea
|
||||||
vtrpost = post.Overlay()
|
vtrpost = post.Overlay()
|
||||||
okpost = true
|
okpost = true
|
||||||
default:
|
default:
|
||||||
panic("invalid tree type")
|
// This should only happen for the first block of the
|
||||||
|
// conversion, when the previous tree is a merkle tree.
|
||||||
|
// Logically, the "previous" verkle tree is an empty tree.
|
||||||
|
okpre = true
|
||||||
|
vtrpre = trie.NewVerkleTrie(verkle.New(), state.Database().TrieDB(), utils.NewPointCache(), false)
|
||||||
|
post := state.GetTrie().(*trie.TransitionTrie)
|
||||||
|
vtrpost = post.Overlay()
|
||||||
|
okpost = true
|
||||||
}
|
}
|
||||||
if okpre && okpost {
|
if okpre && okpost {
|
||||||
if len(keys) > 0 {
|
if len(keys) > 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue