fix some typos

parent 1dc57cfe
......@@ -241,7 +241,7 @@ func (api *API) renterContractsHandler(w http.ResponseWriter, _ *http.Request, _
NetAddress: c.NetAddress,
LastTransaction: c.LastRevisionTxn,
RenterFunds: c.RenterFunds(),
Size: modules.SectorSize * uint64(len(c.MerkleRoots)),
Size: c.LastRevision.NewFileSize,
})
}
WriteJSON(w, RenterContracts{
......
......@@ -190,7 +190,7 @@ File Contract Revision
8. The renter signs the revision and sends the signature to the host.
9. The host signs the revision and sends the siganture to the renter. Both
9. The host signs the revision and sends the signature to the renter. Both
parties submit the new revision to the transaction pool. The connection
deadline is reset to 600 seconds (unless the maximum deadline has been
reached), and the loop restarts.
......
......@@ -107,7 +107,7 @@ func (h *Host) managedDownloadIteration(conn net.Conn, so *storageObligation) er
return extendErr("failed to write acceptance for renter revision: ", ErrorConnection(err.Error()))
}
// Renter will send a transaction siganture for the file contract revision.
// Renter will send a transaction signature for the file contract revision.
var renterSignature types.TransactionSignature
err = encoding.ReadObject(conn, &renterSignature, modules.NegotiateMaxTransactionSignatureSize)
if err != nil {
......
......@@ -143,7 +143,7 @@ func (h *Host) managedRPCFormContract(conn net.Conn) error {
// The renter will now send a negotiation response, followed by transaction
// signatures for the file contract transaction in the case of acceptance.
// The transaction signatures will be followed by another transaction
// siganture, to sign a no-op file contract revision.
// signature, to sign a no-op file contract revision.
err = modules.ReadNegotiationAcceptance(conn)
if err != nil {
return extendErr("renter did not accept updated transactions: ", ErrorCommunication(err.Error()))
......@@ -166,7 +166,7 @@ func (h *Host) managedRPCFormContract(conn net.Conn) error {
// send the signatures so that the renter can immediately have the
// completed file contract.
//
// During finalization, the siganture for the revision is also checked, and
// During finalization, the signature for the revision is also checked, and
// signatures for the revision transaction are created.
h.mu.RLock()
hostCollateral := contractCollateral(h.settings, txnSet[len(txnSet)-1].FileContracts[0])
......
......@@ -176,7 +176,7 @@ func (h *Host) managedRPCRenewContract(conn net.Conn) error {
// transaction and submits it to the blockchain, creating a storage
// obligation in the process. The host's part is now complete and the
// contract is finalized, but to give confidence to the renter the host
// will send the sigantures so that the renter can immediately have the
// will send the signatures so that the renter can immediately have the
// completed file contract.
//
// During finalization the signatures sent by the renter are all checked.
......
......@@ -71,7 +71,7 @@ func (tp *TransactionPool) IsStandardTransaction(t types.Transaction) error {
// of the UnlockConditions, which currently can appear in 3 separate fields
// of the transaction. Unrecognized types are ignored because a softfork
// may make certain unrecognized signatures invalid, and this node cannot
// tell which sigantures are the invalid ones.
// tell which signatures are the invalid ones.
for _, sci := range t.SiacoinInputs {
err := tp.checkUnlockConditions(sci.UnlockConditions)
if err != nil {
......
......@@ -23,7 +23,7 @@ var (
SignatureEd25519 = Specifier{'e', 'd', '2', '5', '5', '1', '9'}
ErrEntropyKey = errors.New("transaction tries to sign an entproy public key")
ErrFrivilousSignature = errors.New("transaction contains a frivilous siganture")
ErrFrivolousSignature = errors.New("transaction contains a frivolous signature")
ErrInvalidPubKeyIndex = errors.New("transaction contains a signature that points to a nonexistent public key")
ErrInvalidUnlockHashChecksum = errors.New("provided unlock hash has an invalid checksum")
ErrMissingSignatures = errors.New("transaction has inputs with missing signatures")
......@@ -327,7 +327,7 @@ func (t *Transaction) validSignatures(currentHeight BlockHeight) error {
// Check that sig corresponds to an entry in sigMap.
inSig, exists := sigMap[crypto.Hash(sig.ParentID)]
if !exists || inSig.remainingSignatures == 0 {
return ErrFrivilousSignature
return ErrFrivolousSignature
}
// Check that sig's key hasn't already been used.
_, exists = inSig.usedKeys[sig.PublicKeyIndex]
......
......@@ -250,7 +250,7 @@ func TestTransactionValidSignatures(t *testing.T) {
t.Error(err)
}
// Corrupt one of the sigantures.
// Corrupt one of the signatures.
sig0[0]++
txn.TransactionSignatures[0].Signature = sig0[:]
err = txn.validSignatures(10)
......@@ -288,10 +288,10 @@ func TestTransactionValidSignatures(t *testing.T) {
}
txn.SiafundInputs = txn.SiafundInputs[:len(txn.SiafundInputs)-1]
// Add a frivilous signature
// Add a frivolous signature
txn.TransactionSignatures = append(txn.TransactionSignatures, TransactionSignature{})
err = txn.validSignatures(10)
if err != ErrFrivilousSignature {
if err != ErrFrivolousSignature {
t.Error(err)
}
txn.TransactionSignatures = txn.TransactionSignatures[:len(txn.TransactionSignatures)-1]
......
......@@ -184,9 +184,9 @@ func (t Transaction) followsStorageProofRules() error {
// noRepeats checks that a transaction does not spend multiple outputs twice,
// submit two valid storage proofs for the same file contract, etc. We
// frivilously check that a file contract termination and storage proof don't
// frivolously check that a file contract termination and storage proof don't
// act on the same file contract. There is very little overhead for doing so,
// and the check is only frivilous because of the current rule that file
// and the check is only frivolous because of the current rule that file
// contract terminations are not valid after the proof window opens.
func (t Transaction) noRepeats() error {
// Check that there are no repeat instances of siacoin outputs, storage
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment