From d5770102e803062fed8684c56037da6e9a7ce94f Mon Sep 17 00:00:00 2001 From: tsinglua Date: Mon, 16 Mar 2026 17:11:10 +0800 Subject: [PATCH] chore: fix some minor issues in the comments Signed-off-by: tsinglua --- common/ledger/blkstorage/block_serialization_test.go | 2 +- common/ledger/blockledger/util.go | 5 ++--- common/ledger/testutil/test_helper.go | 4 ++-- core/ledger/kvledger/rwset_backward_compatibility_test.go | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/common/ledger/blkstorage/block_serialization_test.go b/common/ledger/blkstorage/block_serialization_test.go index c09aed125db..b849cefdd72 100644 --- a/common/ledger/blkstorage/block_serialization_test.go +++ b/common/ledger/blkstorage/block_serialization_test.go @@ -73,7 +73,7 @@ func TestSerializedBlockInfo(t *testing.T) { testSerializedBlockInfo(t, block, c) }) - t.Run("malformed tx-envelop for one of the transactions", func(t *testing.T) { + t.Run("malformed tx-envelope for one of the transactions", func(t *testing.T) { block := testutil.ConstructTestBlock(t, 1, 10, 100) // malformed Payload for block.Data.Data[1] = protoutil.MarshalOrPanic(&common.Envelope{ diff --git a/common/ledger/blockledger/util.go b/common/ledger/blockledger/util.go index 7c637bf8cfb..58fedd2d5ea 100644 --- a/common/ledger/blockledger/util.go +++ b/common/ledger/blockledger/util.go @@ -41,10 +41,9 @@ func (nfei *NotFoundErrorIterator) ReadyChan() <-chan struct{} { func (nfei *NotFoundErrorIterator) Close() {} // CreateNextBlock provides a utility way to construct the next block from -// contents and metadata for a given ledger +// contents and metadata for a given ledger. // XXX This will need to be modified to accept marshaled envelopes -// -// to accommodate non-deterministic marshaling +// to accommodate non-deterministic marshaling. func CreateNextBlock(rl Reader, messages []*cb.Envelope) *cb.Block { var nextBlockNumber uint64 var previousBlockHash []byte diff --git a/common/ledger/testutil/test_helper.go b/common/ledger/testutil/test_helper.go index 8f846496eda..d9ce30879f3 100644 --- a/common/ledger/testutil/test_helper.go +++ b/common/ledger/testutil/test_helper.go @@ -335,7 +335,7 @@ func constructBytesProposalResponsePayload(channelID string, ccid *pb.ChaincodeI return presp.Payload, nil } -// ConstructSignedTxEnvWithDefaultSigner constructs a transaction envelop for tests with a default signer. +// ConstructSignedTxEnvWithDefaultSigner constructs a transaction envelope for tests with a default signer. // This method helps other modules to construct a transaction with supplied parameters func ConstructSignedTxEnvWithDefaultSigner( chainID string, @@ -386,7 +386,7 @@ func ConstructUnsignedTxEnv( ) } -// ConstructSignedTxEnv constructs a transaction envelop for tests +// ConstructSignedTxEnv constructs a transaction envelope for tests func ConstructSignedTxEnv( channelID string, ccid *pb.ChaincodeID, diff --git a/core/ledger/kvledger/rwset_backward_compatibility_test.go b/core/ledger/kvledger/rwset_backward_compatibility_test.go index e171ade3c34..ebfb12091b0 100644 --- a/core/ledger/kvledger/rwset_backward_compatibility_test.go +++ b/core/ledger/kvledger/rwset_backward_compatibility_test.go @@ -57,7 +57,7 @@ func testGenerateSampleRWSet(t *testing.T) []byte { txid := util.GenerateUUID() - // perform a range query for significant larger scan so that the merkle tree building kicks in + // perform a range query for significantly larger scan so that the merkle tree building kicks in // each level contains max 50 nodes per the current configuration simulator, err := ledger.NewTxSimulator(txid) require.NoError(t, err)