This commit is contained in:
Alex Sharov 2021-09-23 09:14:00 +07:00 committed by GitHub
parent d7159cd8bd
commit 2b804cdc35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,12 +268,12 @@ func BenchmarkDecodingAccount(b *testing.B) {
b.ResetTimer()
for _, test := range accountCases {
test := test
encodedAccount := make([]byte, test.acc.EncodingLengthForStorage())
b.Run(fmt.Sprint(test.name), func(b *testing.B) {
for i := 0; i < b.N; i++ {
b.StopTimer()
test.acc.Nonce = uint64(i)
test.acc.Balance.SetUint64(uint64(i))
encodedAccount := make([]byte, test.acc.EncodingLengthForStorage())
test.acc.EncodeForStorage(encodedAccount)