Skip to content

Commit

Permalink
Update nonexistent account check to compare bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Apr 12, 2024
1 parent 6660cec commit fab52c9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/statemanager/src/rpcStateManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ export class RPCStateManager implements EVMStateManagerInterface {
}

const accountFromProvider = await this.getAccountFromProvider(address)

const account =
accountFromProvider.codeHash.every((e: any) => e === 0) ||
equalsBytes(accountFromProvider.codeHash, new Uint8Array(32).fill(0)) ||
equalsBytes(accountFromProvider.serialize(), KECCAK256_RLP_EMPTY_ACCOUNT)
? undefined
: Account.fromRlpSerializedAccount(accountFromProvider.serialize())
Expand Down

0 comments on commit fab52c9

Please sign in to comment.