Cmptbility test for Root StateDB Accounts tree

Checked with commonjs version:
c8414bd205
This commit is contained in:
arnaucube
2020-11-10 17:45:42 +01:00
parent 3a94363daf
commit a9f112c4ce
3 changed files with 91 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"math"
"math/big"
"strings"
"testing"
ethCommon "github.com/ethereum/go-ethereum/common"
@@ -185,6 +186,9 @@ func TestAccountLoopRandom(t *testing.T) {
}
func bigFromStr(h string, u int) *big.Int {
if u == 16 {
h = strings.TrimPrefix(h, "0x")
}
b, ok := new(big.Int).SetString(h, u)
if !ok {
panic("bigFromStr err")