-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add method to disable root verification for T8n and not Reference tests #6013
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,8 @@ public class BonsaiReferenceTestWorldState extends BonsaiWorldState | |
private final BonsaiReferenceTestWorldStateStorage refTestStorage; | ||
private final BonsaiPreImageProxy preImageProxy; | ||
|
||
private boolean disableRootHashVerification; | ||
|
||
protected BonsaiReferenceTestWorldState( | ||
final BonsaiReferenceTestWorldStateStorage worldStateStorage, | ||
final CachedMerkleTrieLoader cachedMerkleTrieLoader, | ||
|
@@ -87,7 +89,7 @@ public ReferenceTestWorldState copy() { | |
*/ | ||
@Override | ||
protected void verifyWorldStateRoot(final Hash calculatedStateRoot, final BlockHeader header) { | ||
if (!header.getStateRoot().equals(Hash.ZERO)) { | ||
if (!disableRootHashVerification) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Nevermind - it looks like retesteth subcommand is still using forest |
||
super.verifyWorldStateRoot(calculatedStateRoot, header); | ||
} | ||
} | ||
|
@@ -125,6 +127,10 @@ public Stream<StreamableAccount> streamAccounts(final Bytes32 startKeyHash, fina | |
return this.refTestStorage.streamAccounts(this, startKeyHash, limit); | ||
} | ||
|
||
public void disableRootHashVerification() { | ||
disableRootHashVerification = true; | ||
} | ||
|
||
static class NoOpTrieLogManager implements TrieLogManager { | ||
private final Subscribers<TrieLogEvent.TrieLogObserver> trieLogObservers = Subscribers.create(); | ||
private final TrieLogFactory trieLogFactory = new TrieLogFactoryImpl(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍