From 75f4fac8cfa13b785d8b70043cd46fcb9a0a519c Mon Sep 17 00:00:00 2001 From: alan <652732310@qq.com> Date: Tue, 29 Oct 2024 13:06:16 +0800 Subject: [PATCH] add comment to GetBalance --- core/vm/interface.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/vm/interface.go b/core/vm/interface.go index 9229f4d2cd..a668521320 100644 --- a/core/vm/interface.go +++ b/core/vm/interface.go @@ -35,6 +35,7 @@ type StateDB interface { SubBalance(common.Address, *uint256.Int, tracing.BalanceChangeReason) uint256.Int AddBalance(common.Address, *uint256.Int, tracing.BalanceChangeReason) uint256.Int + // note: should never modify the returned value, as it's reused for performance purpose GetBalance(common.Address) *uint256.Int GetNonce(common.Address) uint64