From ac22de817e3b6bcaa334455459f61b6669a38f16 Mon Sep 17 00:00:00 2001 From: rusttech Date: Tue, 3 Dec 2024 17:16:48 +0800 Subject: [PATCH] chore: fix some function names in comment (#2301) Signed-off-by: rusttech --- core/state.go | 2 +- core/trie/proof.go | 2 +- core/trie/trie.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/state.go b/core/state.go index effde8b518..378ba65bec 100644 --- a/core/state.go +++ b/core/state.go @@ -367,7 +367,7 @@ func (s *State) updateStorageBuffered(contractAddr *felt.Felt, updateDiff map[fe return bufferedTxn, nil } -// updateContractStorage applies the diff set to the Trie of the +// updateContractStorages applies the diff set to the Trie of the // contract at the given address in the given Txn context. func (s *State) updateContractStorages(stateTrie *trie.Trie, diffs map[felt.Felt]map[felt.Felt]*felt.Felt, blockNumber uint64, logChanges bool, diff --git a/core/trie/proof.go b/core/trie/proof.go index 517ae60764..6dcbe3960c 100644 --- a/core/trie/proof.go +++ b/core/trie/proof.go @@ -314,7 +314,7 @@ func GetProof(key *Key, tri *Trie) ([]ProofNode, error) { return proofNodes, nil } -// verifyProof checks if `leafPath` leads from `root` to `leafHash` along the `proofNodes` +// VerifyProof checks if `leafPath` leads from `root` to `leafHash` along the `proofNodes` // https://github.com/eqlabs/pathfinder/blob/main/crates/merkle-tree/src/tree.rs#L2006 func VerifyProof(root *felt.Felt, key *Key, value *felt.Felt, proofs []ProofNode, hash hashFunc) bool { expectedHash := root diff --git a/core/trie/trie.go b/core/trie/trie.go index c03357d3af..ff978c8709 100644 --- a/core/trie/trie.go +++ b/core/trie/trie.go @@ -93,7 +93,7 @@ func RunOnTempTriePoseidon(height uint8, do func(*Trie) error) error { return do(trie) } -// feltToBitSet Converts a key, given in felt, to a trie.Key which when followed on a [Trie], +// feltToKey Converts a key, given in felt, to a trie.Key which when followed on a [Trie], // leads to the corresponding [Node] func (t *Trie) feltToKey(k *felt.Felt) Key { kBytes := k.Bytes()