From 541346ce9d9f24451e6573962ac28b5034cdb182 Mon Sep 17 00:00:00 2001 From: soonsouth Date: Tue, 10 Dec 2024 11:45:02 +0800 Subject: [PATCH] chore: fix some function names in comment Signed-off-by: soonsouth --- internal/testutil/rhp/v3/rhp.go | 4 ++-- persist/sqlite/consensus.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/testutil/rhp/v3/rhp.go b/internal/testutil/rhp/v3/rhp.go index 829027b3..943cd3a7 100644 --- a/internal/testutil/rhp/v3/rhp.go +++ b/internal/testutil/rhp/v3/rhp.go @@ -597,7 +597,7 @@ func hashFinalRevision(clearing types.FileContractRevision, renewal types.FileCo return h.Sum() } -// HashRevision returns the hash of rev. +// hashRevision returns the hash of rev. func hashRevision(rev types.FileContractRevision) types.Hash256 { h := types.NewHasher() rev.EncodeTo(h.E) @@ -640,7 +640,7 @@ func validateHostRevisionSignature(sig types.TransactionSignature, fcID types.Fi return nil } -// InitialRevision returns the first revision of a file contract formation +// initialRevision returns the first revision of a file contract formation // transaction. func initialRevision(formationTxn *types.Transaction, hostPubKey, renterPubKey types.UnlockKey) types.FileContractRevision { fc := formationTxn.FileContracts[0] diff --git a/persist/sqlite/consensus.go b/persist/sqlite/consensus.go index a3754d9c..be604643 100644 --- a/persist/sqlite/consensus.go +++ b/persist/sqlite/consensus.go @@ -306,7 +306,7 @@ func (ux *updateTx) RevertContractChainIndexElement(index types.ChainIndex) erro return err } -// ApplyContractChainIndexElements adds or updates the merkle proof of +// AddContractChainIndexElement adds or updates the merkle proof of // chain index state elements func (ux *updateTx) AddContractChainIndexElement(ci types.ChainIndexElement) error { _, err := ux.tx.Exec(`INSERT INTO contracts_v2_chain_index_elements (id, height, merkle_proof, leaf_index) VALUES (?, ?, ?, ?) ON CONFLICT (id) DO UPDATE SET merkle_proof=EXCLUDED.merkle_proof, leaf_index=EXCLUDED.leaf_index, height=EXCLUDED.height`, encode(ci.ChainIndex.ID), ci.ChainIndex.Height, encode(ci.StateElement.MerkleProof), encode(ci.StateElement.LeafIndex))