Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
Signed-off-by: Tatsuya Sato <[email protected]>
  • Loading branch information
satota2 authored and denyeart committed Feb 28, 2024
1 parent d2fe22b commit d3ed16c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion core/chaincode/lifecycle/scc.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ type SCC struct {
// Functions provides the backing implementation of lifecycle.
Functions SCCFunctions

// Dispatcher handles the rote protobuf boilerplate for unmarshalling/marshaling
// Dispatcher handles the rote protobuf boilerplate for unmarshaling/marshaling
// the inputs and outputs of the SCC functions.
Dispatcher *dispatcher.Dispatcher
}
Expand Down
4 changes: 2 additions & 2 deletions core/peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ func (p *Peer) GetPolicyManager(cid string) policies.Manager {
return nil
}

// JoinBySnaphotStatus queries ledger mgr to get the status of joinbysnapshot
func (p *Peer) JoinBySnaphotStatus() *pb.JoinBySnapshotStatus {
// JoinBySnapshotStatus queries ledger mgr to get the status of joinbysnapshot
func (p *Peer) JoinBySnapshotStatus() *pb.JoinBySnapshotStatus {
return p.LedgerMgr.JoinBySnapshotStatus()
}

Expand Down
6 changes: 3 additions & 3 deletions core/peer/peer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,14 @@ func TestCreateChannelBySnapshot(t *testing.T) {
require.NoError(t, err)

expectedStatus := &pb.JoinBySnapshotStatus{InProgress: true, BootstrappingSnapshotDir: snapshotDir}
require.Equal(t, expectedStatus, peerInstance.JoinBySnaphotStatus())
require.Equal(t, expectedStatus, peerInstance.JoinBySnapshotStatus())

// write a msg to waitCh to unblock channel init func
waitCh <- struct{}{}

// wait until ledger creation is done
ledgerCreationDone := func() bool {
return !peerInstance.JoinBySnaphotStatus().InProgress
return !peerInstance.JoinBySnapshotStatus().InProgress
}
require.Eventually(t, ledgerCreationDone, time.Minute, time.Second)

Expand All @@ -267,7 +267,7 @@ func TestCreateChannelBySnapshot(t *testing.T) {
require.Equal(t, uint64(1), bcInfo.GetHeight())

expectedStatus = &pb.JoinBySnapshotStatus{InProgress: false, BootstrappingSnapshotDir: ""}
require.Equal(t, expectedStatus, peerInstance.JoinBySnaphotStatus())
require.Equal(t, expectedStatus, peerInstance.JoinBySnapshotStatus())

// Bad ledger
ledger = peerInstance.GetLedger("BogusChain")
Expand Down
2 changes: 1 addition & 1 deletion core/scc/cscc/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func (e *PeerConfiger) getChannels() pb.Response {

// joinBySnapshotStatus returns information about joinbysnapshot running status.
func (e *PeerConfiger) joinBySnapshotStatus() pb.Response {
status := e.peer.JoinBySnaphotStatus()
status := e.peer.JoinBySnapshotStatus()

statusBytes, err := proto.Marshal(status)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions docs/source/metrics_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following orderer metrics are exported for consumption by Prometheus.
+------------------------------------------------------+-----------+------------------------------------------------------------+--------------------------------------------------------------------------------+
| Name | Type | Description | Labels |
+======================================================+===========+============================================================+===========+====================================================================+
| blockcutter_block_fill_duration | histogram | The time from first transaction enqueing to the block | channel | |
| blockcutter_block_fill_duration | histogram | The time from first transaction enqueuing to the block | channel | |
| | | being cut in seconds. | | |
+------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+
| broadcast_enqueue_duration | histogram | The time to enqueue a transaction in seconds. | channel | |
Expand Down Expand Up @@ -252,7 +252,7 @@ associated with the metric.
+---------------------------------------------------------------------------+-----------+------------------------------------------------------------+
| Bucket | Type | Description |
+===========================================================================+===========+============================================================+
| blockcutter.block_fill_duration.%{channel} | histogram | The time from first transaction enqueing to the block |
| blockcutter.block_fill_duration.%{channel} | histogram | The time from first transaction enqueuing to the block |
| | | being cut in seconds. |
+---------------------------------------------------------------------------+-----------+------------------------------------------------------------+
| broadcast.enqueue_duration.%{channel}.%{type}.%{status} | histogram | The time to enqueue a transaction in seconds. |
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/blockcutter/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "github.com/hyperledger/fabric-lib-go/common/metrics"
var blockFillDuration = metrics.HistogramOpts{
Namespace: "blockcutter",
Name: "block_fill_duration",
Help: "The time from first transaction enqueing to the block being cut in seconds.",
Help: "The time from first transaction enqueuing to the block being cut in seconds.",
LabelNames: []string{"channel"},
StatsdFormat: "%{#fqname}.%{channel}",
}
Expand Down

0 comments on commit d3ed16c

Please sign in to comment.