Permalink
Browse files

correct spelling mistakes

  • Loading branch information...
1 parent ac29c38 commit 8bdb3008fa84b3cc42dc9f352e69a104f10015e1 @lukechampine lukechampine committed May 3, 2016
Showing with 82 additions and 81 deletions.
  1. +1 −1 README.md
  2. +1 −1 api/explorer.go
  3. +2 −2 api/server_helpers_test.go
  4. +1 −1 api/wallet_test.go
  5. +1 −1 crypto/merkle_test.go
  6. +1 −1 doc/Consensus.md
  7. +1 −1 doc/Encoding.md
  8. +3 −3 doc/File Contract Negotiation.md
  9. +2 −2 modules/consensus.go
  10. +1 −1 modules/consensus/accept.go
  11. +1 −1 modules/consensus/accept_txntypes_test.go
  12. +6 −6 modules/consensus/applytransaction_test.go
  13. +1 −1 modules/consensus/changelog.go
  14. +1 −1 modules/consensus/database.go
  15. +1 −1 modules/consensus/diffs.go
  16. +3 −3 modules/consensus/subscribe.go
  17. +1 −1 modules/consensus/synchronize_ibd_test.go
  18. +1 −1 modules/explorer/explorer.go
  19. +1 −1 modules/gateway/nodes_test.go
  20. +1 −1 modules/gateway/rpc_test.go
  21. +1 −1 modules/host/consts.go
  22. +1 −1 modules/host/dependencies.go
  23. +4 −4 modules/host/host.go
  24. +1 −1 modules/host/host_test.go
  25. +1 −1 modules/host/negotiatedownload.go
  26. +1 −1 modules/host/negotiaterevisecontract.go
  27. +1 −1 modules/host/network.go
  28. +1 −1 modules/host/storagemanager/consistency.go
  29. +1 −1 modules/host/storagemanager/consts.go
  30. +1 −1 modules/host/storagemanager/dependencies.go
  31. +1 −1 modules/host/storagemanager/storagefolders.go
  32. +1 −1 modules/host/storagemanager/storagefolders_smoke_errors_test.go
  33. +1 −1 modules/host/storagemanager/storagefolders_smoke_test.go
  34. +1 −1 modules/host/storagemanager/storagefolders_test.go
  35. +3 −3 modules/host/storagemanager/storagemanager.go
  36. +1 −1 modules/host/storageobligations.go
  37. +1 −1 modules/host/update.go
  38. +2 −1 modules/miner/cpuminer.go
  39. +1 −1 modules/renter/contractor/contractor.go
  40. +1 −1 modules/renter/hostdb/hostdb.go
  41. +2 −2 modules/renter/persist.go
  42. +1 −1 modules/renter/renter_test.go
  43. +1 −1 modules/storagemanager.go
  44. +1 −1 modules/transactionpool/subscribe.go
  45. +1 −1 modules/transactionpool/transactionpool.go
  46. +1 −1 modules/transactionpool/update_test.go
  47. +2 −2 modules/wallet.go
  48. +1 −1 modules/wallet/encrypt_test.go
  49. +1 −1 modules/wallet/seed.go
  50. +1 −1 modules/wallet/transactions_test.go
  51. +3 −3 persist/persist_test.go
  52. +1 −1 profile/profile.go
  53. +1 −1 siac/README.md
  54. +1 −1 siac/walletcmd.go
  55. +3 −3 types/currency_test.go
  56. +1 −1 types/signatures_test.go
  57. +3 −3 types/target_test.go
View
@@ -177,7 +177,7 @@ v0.4.7 (patch)
- Dropped support for v0.3.3.x
v0.4.6 (patch)
-- Removed over-agressive consistency check
+- Removed over-aggressive consistency check
v0.4.5 (patch)
- Fixed last prominent bug in block database
View
@@ -225,7 +225,7 @@ func (srv *Server) buildTransactionSet(txids []types.TransactionID) (txns []Expl
// payouts, the block might be the transaction.
block, height, exists := srv.explorer.Transaction(txid)
if !exists && build.DEBUG {
- panic("explorer pointing to nonexistant txn")
+ panic("explorer pointing to nonexistent txn")
}
// Check if the block is the transaction.
@@ -164,7 +164,7 @@ func assembleExplorerServerTester(testdir string) (*serverTester, error) {
}
// createServerTester creates a server tester object that is ready for testing,
-// including money in the wallet and all modules initalized.
+// including money in the wallet and all modules initialized.
func createServerTester(name string) (*serverTester, error) {
// Create the testing directory.
testdir := build.TempDir("api", name)
@@ -189,7 +189,7 @@ func createServerTester(name string) (*serverTester, error) {
return st, nil
}
-// createExplorerServerTester creates a server tester object contianing only
+// createExplorerServerTester creates a server tester object containing only
// the explorer and some presets that match standard explorer setups.
func createExplorerServerTester(name string) (*serverTester, error) {
testdir := build.TempDir("api", name)
View
@@ -157,7 +157,7 @@ func TestIntegrationWalletGETSiacoins(t *testing.T) {
}
defer st.server.Close()
- // Check the intial wallet is encrypted, unlocked, and has the siacoins
+ // Check the initial wallet is encrypted, unlocked, and has the siacoins
// that got mined.
var wg WalletGET
err = st.getAPI("/wallet", &wg)
@@ -16,7 +16,7 @@ func TestTreeBuilder(t *testing.T) {
// function is really for code coverage.
}
-// TestCalculateLeaves probes the CalulateLeaves function.
+// TestCalculateLeaves probes the CalculateLeaves function.
func TestCalculateLeaves(t *testing.T) {
tests := []struct {
size, expSegs uint64
View
@@ -259,7 +259,7 @@ output spendable by the 'missed proof spend hash'.
All contracts must have a non-zero payout, 'start' must be before 'end', and
'start' must be greater than the current height of the blockchain. A storage
-proof is acceptible if it is submitted in the block of height 'end'.
+proof is acceptable if it is submitted in the block of height 'end'.
File contracts are created with a 'Revision Hash', which is the Merkle root of
an unlock conditions object. A 'file contract revision' can be submitted which
View
@@ -15,7 +15,7 @@ Unmarshal([]byte{3, 0, 0, 0, 0, 0, 0, 0}, &x)
```
Note that this leads to some ambiguity. Since an `int64` and a `uint64` are
-both 8 bytes long, it is possible to encode an `int64` and succesfully decode
+both 8 bytes long, it is possible to encode an `int64` and successfully decode
it as a `uint64`. As a result, it is imperative that *the decoder knows
exactly what it is decoding*. Developers must rely on context to determine
what type to decode into.
@@ -12,7 +12,7 @@ untrusted environment. Managing data on Sia happens through several protocols:
performed to verify that the renter is able to create the signatures to
modify the file contract revision.
-+ File Contract Creation - no data is uploaded during the inital creation of a
++ File Contract Creation - no data is uploaded during the initial creation of a
file contract, but funds are allocated so that the file contract can be
iteratively revised in the future.
@@ -68,15 +68,15 @@ Revision Request
----------------
The renter requests a recent revision from the host. Often, this request
-preceeds modifications. A file contract can only be open for revision with one
+precedes modifications. A file contract can only be open for revision with one
party at a time. To prevent DoS attacks, the party must authenticate here by
performing a challenge-response protocol during the revision request. Putting
this challenge-response requirement in the revision-request can help improve
privacy, though the host is under no cryptographic or incentive-based
obligation to preserve the privacy of the revision.
1. The renter makes an RPC to the host, opening a connection. The connection
- deadline sould be at least 120 seconds. The renter sends the file contract
+ deadline should be at least 120 seconds. The renter sends the file contract
id for the revision being requested.
2. The host writes 32 bytes of random data that the renter must sign for the
@@ -70,7 +70,7 @@ type (
ProcessConsensusChange(ConsensusChange)
}
- // A ConsensusChange enumerates a set of changes that occured to the consensus set.
+ // A ConsensusChange enumerates a set of changes that occurred to the consensus set.
ConsensusChange struct {
// ID is a unique id for the consensus change derived from the reverted
// and applied blocks.
@@ -181,7 +181,7 @@ type (
Close() error
// ConsensusSetSubscribe adds a subscriber to the list of subscribers,
- // and gives them every consensus change that has occured since the
+ // and gives them every consensus change that has occurred since the
// change with the provided id. There are a few special cases,
// described by the ConsensusChangeX variables in this package.
ConsensusSetSubscribe(ConsensusSetSubscriber, ConsensusChangeID) error
@@ -149,7 +149,7 @@ func (cs *ConsensusSet) addBlockToTree(b types.Block) (ce changeEntry, err error
// modules.ErrNonExtendingBlock should be returned if the block does
// not extend the current blockchain, however the changes from newChild
- // should be comitted (which means 'nil' must be returned). A flag is
+ // should be committed (which means 'nil' must be returned). A flag is
// set to indicate that modules.ErrNonExtending should be returned.
nonExtending = !newNode.heavierThan(currentNode)
if nonExtending {
@@ -1004,7 +1004,7 @@ func (cst *consensusSetTester) testPaymentChannelBlocks() error {
}
refundTxn.TransactionSignatures[0].Signature = cryptoSig1[:]
- // Recieving entity never communitcates, funding entity must reclaim
+ // Receiving entity never communitcates, funding entity must reclaim
// the 'channelSize' coins that were intended to go to the channel.
reclaimUC, err := cst.wallet.NextAddress()
reclaimAddr := reclaimUC.UnlockHash()
@@ -207,7 +207,7 @@ func TestMisuseApplySiacoinOutputs(t *testing.T) {
defer func() {
r := recover()
if r == nil {
- t.Error("no panic occured when misusing applySiacoinInput")
+ t.Error("no panic occurred when misusing applySiacoinInput")
}
}()
cst.cs.applySiacoinOutputs(pb, txn)
@@ -306,7 +306,7 @@ func TestMisuseApplyFileContracts(t *testing.T) {
defer func() {
r := recover()
if r == nil {
- t.Error("no panic occured when misusing applySiacoinInput")
+ t.Error("no panic occurred when misusing applySiacoinInput")
}
}()
cst.cs.applyFileContracts(pb, txn)
@@ -433,7 +433,7 @@ func TestMisuseApplyFileContractRevisions(t *testing.T) {
defer func() {
r := recover()
if r != errNilItem {
- t.Error("no panic occured when misusing applySiacoinInput")
+ t.Error("no panic occurred when misusing applySiacoinInput")
}
}()
txn := types.Transaction{
@@ -584,7 +584,7 @@ func TestNonexistentStorageProof(t *testing.T) {
defer func() {
r := recover()
if r != errNilItem {
- t.Error("no panic occured when misusing applySiacoinInput")
+ t.Error("no panic occurred when misusing applySiacoinInput")
}
}()
txn := types.Transaction{
@@ -725,7 +725,7 @@ func TestMisuseApplySiafundInputs(t *testing.T) {
defer func() {
r := recover()
if r != ErrMisuseApplySiafundInput {
- t.Error("no panic occured when misusing applySiacoinInput")
+ t.Error("no panic occurred when misusing applySiacoinInput")
t.Error(r)
}
}()
@@ -826,7 +826,7 @@ func TestMisuseApplySiafundOutputs(t *testing.T) {
defer func() {
r := recover()
if r != ErrMisuseApplySiafundOutput {
- t.Error("no panic occured when misusing applySiafundInput")
+ t.Error("no panic occurred when misusing applySiafundInput")
}
}()
cst.cs.applySiafundOutputs(pb, txn)
@@ -93,7 +93,7 @@ func appendChangeLog(tx *bolt.Tx, ce changeEntry) error {
}
// getEntry returns the change entry with a given id, using a bool to indicate
-// existance.
+// existence.
func getEntry(tx *bolt.Tx, id modules.ConsensusChangeID) (ce changeEntry, exists bool) {
var cn changeNode
cl := tx.Bucket(ChangeLog)
@@ -92,7 +92,7 @@ func dbInitialized(tx *bolt.Tx) bool {
}
// initDB is run if there is no existing consensus database, creating a
-// database with all the required buckets and sane inital values.
+// database with all the required buckets and sane initial values.
func (cs *ConsensusSet) initDB(tx *bolt.Tx) error {
// Create the compononents of the database.
err := cs.createConsensusDB(tx)
@@ -22,7 +22,7 @@ var (
errWrongRevertDiffSet = errors.New("reverting a diff set that isn't the current block")
)
-// commitDiffSetSanity performs a series of sanity checks before commiting a
+// commitDiffSetSanity performs a series of sanity checks before committing a
// diff set.
func commitDiffSetSanity(tx *bolt.Tx, pb *processedBlock, dir modules.DiffDirection) {
// This function is purely sanity checks.
@@ -112,7 +112,7 @@ func (cs *ConsensusSet) initializeSubscribe(subscriber modules.ConsensusSetSubsc
if start == modules.ConsensusChangeBeginning {
// Special case: for modules.ConsensusChangeBeginning, create an
// initial node pointing to the genesis block. The subscriber will
- // recieve the diffs for all blocks in the consensus set, including
+ // receive the diffs for all blocks in the consensus set, including
// the genesis block.
entry = cs.genesisEntry()
exists = true
@@ -153,8 +153,8 @@ func (cs *ConsensusSet) initializeSubscribe(subscriber modules.ConsensusSetSubsc
}
// ConsensusSetSubscribe adds a subscriber to the list of subscribers, and
-// gives them every consensus change that has occured since the change with the
-// provided id.
+// gives them every consensus change that has occurred since the change with
+// the provided id.
//
// As a special case, using an empty id as the start will have all the changes
// sent to the modules starting with the genesis block.
@@ -286,7 +286,7 @@ func TestInitialBlockchainDownloadDoneRules(t *testing.T) {
}
// Set minIBDWaitTime to 1s for just this test because no blocks are
- // transfered between peers so the wait time can be very short.
+ // transferred between peers so the wait time can be very short.
actualMinIBDWaitTime := minIBDWaitTime
defer func() {
minIBDWaitTime = actualMinIBDWaitTime
@@ -64,7 +64,7 @@ func New(cs modules.ConsensusSet, persistDir string) (*Explorer, error) {
persistDir: persistDir,
}
- // Intialize the persistent structures, including the database.
+ // Initialize the persistent structures, including the database.
err := e.initPersist()
if err != nil {
return nil, err
@@ -115,7 +115,7 @@ func TestRandomNode(t *testing.T) {
nodes[addr]++
}
for node, count := range nodes {
- if count == 0 { // 1-in-200000 chance of occuring naturally
+ if count == 0 { // 1-in-200000 chance of occurring naturally
t.Errorf("node %v was never selected", node)
}
}
@@ -39,7 +39,7 @@ func TestRPC(t *testing.T) {
defer g1.Close()
if err := g1.RPC("foo.com:123", "", nil); err == nil {
- t.Fatal("RPC on unconnected peer succeded")
+ t.Fatal("RPC on unconnected peer succeeded")
}
g2 := newTestingGateway("TestRPC2", t)
@@ -192,7 +192,7 @@ var (
// store the heights sorted in numerical order. The action item itself is
// an array of file contract ids. The host is able to contextually figure
// out what the necessary actions for that item are based on the file
- // contract id and the associated storage obligation that can be retreived
+ // contract id and the associated storage obligation that can be retrieved
// using the id.
bucketActionItems = []byte("BucketActionItems")
@@ -26,7 +26,7 @@ var (
)
// These interfaces define the Host's dependencies. Mocking implementation
-// complexity can be reduced by defining each dependency as the minimium
+// complexity can be reduced by defining each dependency as the minimum
// possible subset of the real dependency.
type (
// dependencies defines all of the dependencies of the Host.
@@ -170,7 +170,7 @@ type Host struct {
// Storage is broken up into sectors. The sectors are distributed across a
// set of storage folders using a strategy that tries to create even
// distributions, but not aggressively. Uneven distributions could be
- // manufactured by an attacker given sufficent knowledge about the disk
+ // manufactured by an attacker given sufficient knowledge about the disk
// layout (knowledge which should be unavailable), but a limited amount of
// damage can be done even with this attack.
lockedStorageObligations map[types.FileContractID]struct{} // Which storage obligations are currently being modified.
@@ -279,17 +279,17 @@ func newHost(dependencies dependencies, cs modules.ConsensusSet, tpool modules.T
_ = h.log.Close()
return nil, err
}
- // After opening the database, it must be initalized. Most commonly,
+ // After opening the database, it must be initialized. Most commonly,
// nothing happens. But for new databases, a set of buckets must be
- // created. Intialization is also a good time to run sanity checks.
+ // created. Initialization is also a good time to run sanity checks.
err = h.initDB()
if err != nil {
_ = h.log.Close()
_ = h.db.Close()
return nil, err
}
- // Load the prior persistance structures.
+ // Load the prior persistence structures.
err = h.load()
if err != nil {
_ = h.log.Close()
@@ -198,7 +198,7 @@ func newHostTester(name string) (*hostTester, error) {
return ht, nil
}
-// TestHostInitialization checks that the host intializes to sensisble default
+// TestHostInitialization checks that the host initializes to sensible default
// values.
func TestHostInitialization(t *testing.T) {
if testing.Short() {
@@ -12,7 +12,7 @@ import (
var (
// errDownloadBadHostValidOutputs is returned if the renter requests a
- // download and pays an insufficent amount to the host valid addresses.
+ // download and pays an insufficient amount to the host valid addresses.
errDownloadBadHostValidOutputs = errors.New("download request rejected for bad host valid outputs")
// errDownloadBadNewFileMerkleRoot is returned if the renter requests a
@@ -14,7 +14,7 @@ import (
var (
// errBadModificationIndex is returned if the renter requests a change on a
// sector root that is not in the file contract.
- errBadModificationIndex = errors.New("renter has made a modification that points to a nonexistant sector")
+ errBadModificationIndex = errors.New("renter has made a modification that points to a nonexistent sector")
// badSectorSize is returned if the renter provides a sector to be inserted
// that is the wrong size.
@@ -98,7 +98,7 @@ func (h *Host) threadedHandleConn(conn net.Conn) {
}
defer conn.Close()
- // Read a specifier indicating which action is beeing called.
+ // Read a specifier indicating which action is being called.
var id types.Specifier
if err := encoding.ReadObject(conn, &id, 16); err != nil {
atomic.AddUint64(&h.atomicUnrecognizedCalls, 1)
@@ -4,7 +4,7 @@ import (
"errors"
)
-// consistency.go contians a bunch of consistency checks for the host. Because
+// consistency.go contains a bunch of consistency checks for the host. Because
// a lot of the consistency is checking that different parts of the host match
// up, it was decided that all consistency checking should go into a single
// file. As an example, the state of the storage obligations sets the standard
@@ -74,7 +74,7 @@ var (
// actually frustrate price planning. 32 GB has been chosen as a minimum
// for the early days of the network, to allow people to experiment in the
// beta, but in the future I think something like 256GB would be much more
- // appropraite.
+ // appropriate.
minimumStorageFolderSize = func() uint64 {
if build.Release == "dev" {
return 1 << 25 // 32 MiB
@@ -26,7 +26,7 @@ var (
// These interfaces define the StorageManager's dependencies. Mocking
// implementation complexity can be reduced by defining each dependency as the
-// minimium possible subset of the real dependency.
+// minimum possible subset of the real dependency.
type (
// dependencies defines all of the dependencies of the StorageManager.
dependencies interface {
@@ -120,7 +120,7 @@ var (
// files. These files have long, cryptographic names and may take up as much as
// a gigabyte of space in filesystem overhead, depending on how the filesystem
// is architected. The host is programmed to gracefully handle full disks, so
-// wihle it might cause the user surprise that the host can't break past 99%
+// while it might cause the user surprise that the host can't break past 99%
// utilization, there should not be any issues if the user overestimates how
// much storage is available in the folder they have offered to Sia. The host
// will put the drive at 100% utilization, which may cause performance
Oops, something went wrong.

0 comments on commit 8bdb300

Please sign in to comment.