correct spelling to US english (#6077)

This commit is contained in:
Callum Waters
2021-02-11 18:59:18 +01:00
committed by GitHub
parent 059d42866c
commit 162f67cf26
61 changed files with 392 additions and 392 deletions
+2 -2
View File
@@ -12,7 +12,7 @@
## Context
We currently use MaxTxs to reap txs from the mempool when proposing a block,
but enforce MaxBytes when unmarshalling a block, so we could easily propose a
but enforce MaxBytes when unmarshaling a block, so we could easily propose a
block thats too large to be valid.
We should just remove MaxTxs all together and stick with MaxBytes, and have a
@@ -33,7 +33,7 @@ MaxBytes provides a clear limit on the total size of a block that requires no
additional calculation if you want to use it to bound resource usage, and there
has been considerable discussions about optimizing tendermint around 1MB blocks.
Regardless, we need some maximum on the size of a block so we can avoid
unmarshalling blocks that are too big during the consensus, and it seems more
unmarshaling blocks that are too big during the consensus, and it seems more
straightforward to provide a single fixed number for this rather than a
computation of "MaxDataBytes + everything else you need to make room for
(signatures, evidence, header)". MaxBytes provides a simple bound so we can
+5 -5
View File
@@ -121,7 +121,7 @@ type Subscription struct {
}
func (s *Subscription) Out() <-chan MsgAndTags
func (s *Subscription) Cancelled() <-chan struct{}
func (s *Subscription) Canceled() <-chan struct{}
func (s *Subscription) Err() error
```
@@ -129,10 +129,10 @@ func (s *Subscription) Err() error
`Unsubscribe`/`UnsubscribeAll` does not close the channel to avoid clients from
receiving a nil message.
`Cancelled()` returns a channel that's closed when the subscription is terminated
`Canceled()` returns a channel that's closed when the subscription is terminated
and supposed to be used in a select statement.
If the channel returned by `Cancelled()` is not closed yet, `Err()` returns nil.
If the channel returned by `Canceled()` is not closed yet, `Err()` returns nil.
If the channel is closed, `Err()` returns a non-nil error explaining why:
`ErrUnsubscribed` if the subscriber choose to unsubscribe,
`ErrOutOfCapacity` if the subscriber is not pulling messages fast enough and the channel returned by `Out()` became full.
@@ -147,7 +147,7 @@ for {
select {
case msgAndTags <- subscription.Out():
// ...
case <-subscription.Cancelled():
case <-subscription.Canceled():
return subscription.Err()
}
```
@@ -232,7 +232,7 @@ In review
- more idiomatic interface
- subscribers know what tags msg was published with
- subscribers aware of the reason their subscription was cancelled
- subscribers aware of the reason their subscription was canceled
### Negative
@@ -314,7 +314,7 @@ type Channel struct {
In <-chan Envelope // Inbound messages (peers to reactors).
Out chan<- Envelope // outbound messages (reactors to peers)
Error chan<- PeerError // Peer error reporting.
messageType proto.Message // Channel's message type, for e.g. unmarshalling.
messageType proto.Message // Channel's message type, for e.g. unmarshaling.
}
// Close closes the channel, also closing Out and Error.
@@ -529,7 +529,7 @@ func RunEchoReactor(router *p2p.Router, peerManager *p2p.PeerManager) error {
}
// EchoReactor provides an echo service, pinging all known peers until the given
// context is cancelled.
// context is canceled.
func EchoReactor(ctx context.Context, channel *p2p.Channel, peerUpdates *p2p.PeerUpdates) error {
ticker := time.NewTicker(5 * time.Second)
defer ticker.Stop()
@@ -567,7 +567,7 @@ func EchoReactor(ctx context.Context, channel *p2p.Channel, peerUpdates *p2p.Pee
case peerUpdate := <-peerUpdates:
fmt.Printf("Peer %q changed status to %q", peerUpdate.PeerID, peerUpdate.Status)
// Exit when context is cancelled.
// Exit when context is canceled.
case <-ctx.Done():
return nil
}