triedb/pathdb: fix tester generator

This commit is contained in:
Ceyhun Onur 2024-12-30 21:18:15 +03:00
parent 67a3b08795
commit 4a51115fed
No known key found for this signature in database
GPG key ID: 60D53BEEE37F6422

View file

@ -222,7 +222,12 @@ func (t *tester) generate(parent common.Hash) (common.Hash, *trienode.MergedNode
dirties = make(map[common.Hash]struct{}) dirties = make(map[common.Hash]struct{})
) )
for i := 0; i < 20; i++ { for i := 0; i < 20; i++ {
switch rand.Intn(opLen) { // Start with account creation always
op := createAccountOp
if i > 0 {
op = rand.Intn(opLen)
}
switch op {
case createAccountOp: case createAccountOp:
// account creation // account creation
addr := testrand.Address() addr := testrand.Address()