1
1
import { MerkleStateManager } from '@ethereumjs/statemanager'
2
2
import {
3
- BranchNode ,
4
- ExtensionNode ,
5
- LeafNode ,
3
+ BranchMPTNode ,
4
+ ExtensionMPTNode ,
5
+ LeafMPTNode ,
6
6
MerklePatriciaTrie ,
7
7
decodeNode ,
8
8
mergeAndFormatKeyPaths ,
@@ -226,8 +226,8 @@ export class TrieNodeFetcher extends Fetcher<JobTask, Uint8Array[], Uint8Array>
226
226
let hasStorageComponent = false
227
227
228
228
// get all children of received node
229
- if ( node instanceof BranchNode ) {
230
- const children = ( node as BranchNode ) . getChildren ( )
229
+ if ( node instanceof BranchMPTNode ) {
230
+ const children = ( node as BranchMPTNode ) . getChildren ( )
231
231
for ( const [ i , embeddedNode ] of children ) {
232
232
if ( embeddedNode !== null ) {
233
233
const newStoragePath = nodePath . concat ( bytesToHex ( Uint8Array . from ( [ i ] ) ) )
@@ -240,7 +240,7 @@ export class TrieNodeFetcher extends Fetcher<JobTask, Uint8Array[], Uint8Array>
240
240
} )
241
241
}
242
242
}
243
- } else if ( node instanceof ExtensionNode ) {
243
+ } else if ( node instanceof ExtensionMPTNode ) {
244
244
this . DEBUG && this . debug ( 'extension node found' )
245
245
const stringPath = bytesToHex ( pathToHexKey ( nodePath , node . key ( ) , 'hex' ) )
246
246
const syncPath =
@@ -341,7 +341,7 @@ export class TrieNodeFetcher extends Fetcher<JobTask, Uint8Array[], Uint8Array>
341
341
342
342
// add account node data to account trie
343
343
const node = decodeNode ( nodeData )
344
- if ( node instanceof LeafNode ) {
344
+ if ( node instanceof LeafMPTNode ) {
345
345
const key = bytesToHex ( pathToHexKey ( path , node . key ( ) , 'keybyte' ) )
346
346
ops . push ( {
347
347
type : 'put' ,
@@ -359,7 +359,7 @@ export class TrieNodeFetcher extends Fetcher<JobTask, Uint8Array[], Uint8Array>
359
359
if ( pathToStorageNode !== undefined && pathToStorageNode . size > 0 ) {
360
360
for ( const [ path , data ] of pathToStorageNode ) {
361
361
const storageNode = decodeNode ( data )
362
- if ( storageNode instanceof LeafNode ) {
362
+ if ( storageNode instanceof LeafMPTNode ) {
363
363
const storageKey = bytesToHex ( pathToHexKey ( path , storageNode . key ( ) , 'keybyte' ) )
364
364
storageTrieOps . push ( {
365
365
type : 'put' ,
0 commit comments