From a611a5e250807f742f4819743c184cf67ab086c5 Mon Sep 17 00:00:00 2001 From: jsvisa Date: Mon, 21 Jul 2025 14:54:32 +0800 Subject: [PATCH] triedb/pathdb: search account with address length Signed-off-by: jsvisa --- triedb/pathdb/history_reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/triedb/pathdb/history_reader.go b/triedb/pathdb/history_reader.go index 8f72d4053e..d0ecdf035f 100644 --- a/triedb/pathdb/history_reader.go +++ b/triedb/pathdb/history_reader.go @@ -210,7 +210,7 @@ func (r *historyReader) readAccountMetadata(address common.Address, historyID ui n := len(blob) / accountIndexSize pos := sort.Search(n, func(i int) bool { - h := blob[accountIndexSize*i : accountIndexSize*i+common.HashLength] + h := blob[accountIndexSize*i : accountIndexSize*i+common.AddressLength] return bytes.Compare(h, address.Bytes()) >= 0 }) if pos == n {