Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some function names in comment #522

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/testutil/rhp/v3/rhp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion persist/sqlite/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down