From d3ed16cf6908e887cb1a4b12d8bfdb124dfbdaa0 Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Tue, 27 Feb 2024 03:17:17 +0000 Subject: [PATCH] Fix some typos Signed-off-by: Tatsuya Sato --- core/chaincode/lifecycle/scc.go | 2 +- core/peer/peer.go | 4 ++-- core/peer/peer_test.go | 6 +++--- core/scc/cscc/configure.go | 2 +- docs/source/metrics_reference.rst | 4 ++-- orderer/common/blockcutter/metrics.go | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/chaincode/lifecycle/scc.go b/core/chaincode/lifecycle/scc.go index a5659b5bcbc..0ee3c1a641b 100644 --- a/core/chaincode/lifecycle/scc.go +++ b/core/chaincode/lifecycle/scc.go @@ -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 } diff --git a/core/peer/peer.go b/core/peer/peer.go index 0de466520a7..0ccf9e0e5ee 100644 --- a/core/peer/peer.go +++ b/core/peer/peer.go @@ -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() } diff --git a/core/peer/peer_test.go b/core/peer/peer_test.go index 39972857339..bb2061d51ee 100644 --- a/core/peer/peer_test.go +++ b/core/peer/peer_test.go @@ -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) @@ -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") diff --git a/core/scc/cscc/configure.go b/core/scc/cscc/configure.go index 3f4b2073a75..a08eb56825e 100644 --- a/core/scc/cscc/configure.go +++ b/core/scc/cscc/configure.go @@ -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 { diff --git a/docs/source/metrics_reference.rst b/docs/source/metrics_reference.rst index ada9d2e2ae9..7f6ade0abf2 100644 --- a/docs/source/metrics_reference.rst +++ b/docs/source/metrics_reference.rst @@ -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 | | @@ -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. | diff --git a/orderer/common/blockcutter/metrics.go b/orderer/common/blockcutter/metrics.go index 8953ce8b8a0..c0a908259a2 100644 --- a/orderer/common/blockcutter/metrics.go +++ b/orderer/common/blockcutter/metrics.go @@ -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}", }