Skip to content

Commit

Permalink
allow for nullable via tests
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Florentine <justin+github@florentine.us>
  • Loading branch information
jflo committed Mar 31, 2023
1 parent 48f15aa commit 0df53b0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,10 @@ public BesuController build() {
reorgLoggingThreshold,
dataDirectory.toString());

final CachedMerkleTrieLoader cachedMerkleTrieLoader = besuComponent.getCachedMerkleTrieLoader();
final CachedMerkleTrieLoader cachedMerkleTrieLoader =
besuComponent == null
? new CachedMerkleTrieLoader(metricsSystem)
: besuComponent.getCachedMerkleTrieLoader();

final WorldStateArchive worldStateArchive =
createWorldStateArchive(worldStateStorage, blockchain, cachedMerkleTrieLoader);
Expand Down

0 comments on commit 0df53b0

Please sign in to comment.