From 0a12bd874ffda1628069b7ea096ed1315a7b3adb Mon Sep 17 00:00:00 2001 From: GoodDaisy <90915921+GoodDaisy@users.noreply.github.com> Date: Sat, 30 Dec 2023 21:23:03 +0800 Subject: [PATCH] multi: fix typos --- address/address.go | 2 +- asset/interface.go | 2 +- asset/mock.go | 2 +- commitment/commitment_test.go | 2 +- itest/loadtest/mint_batch_test.go | 2 +- proof/courier.go | 4 ++-- rpcserver.go | 4 ++-- tapdb/assets_store_test.go | 2 +- tapgarden/custodian_test.go | 2 +- tapgarden/planter_test.go | 4 ++-- tappsbt/decode.go | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/address/address.go b/address/address.go index 2e95ecca0..1f91ce53f 100644 --- a/address/address.go +++ b/address/address.go @@ -446,7 +446,7 @@ func DecodeAddress(addr string, net *ChainParams) (*Tap, error) { // The HRP is everything before the found '1'. hrp := prefix[:len(prefix)-1] - // Ensure that the hrp we deocded matches the network we're trying to + // Ensure that the hrp we decoded matches the network we're trying to // use the address on. if !IsForNet(hrp, net) { return nil, ErrMismatchedHRP diff --git a/asset/interface.go b/asset/interface.go index 6d1e5368c..acd8d5465 100644 --- a/asset/interface.go +++ b/asset/interface.go @@ -21,6 +21,6 @@ type GenesisSigner interface { type GenesisTxBuilder interface { // BuildGenesisTx constructs a virtual transaction and prevOut that // represent the genesis state transition for a grouped asset. This - // ouput is used to create a group witness for the grouped asset. + // output is used to create a group witness for the grouped asset. BuildGenesisTx(newAsset *Asset) (*wire.MsgTx, *wire.TxOut, error) } diff --git a/asset/mock.go b/asset/mock.go index 4684e585a..17bf29abd 100644 --- a/asset/mock.go +++ b/asset/mock.go @@ -167,7 +167,7 @@ func virtualGenesisTx(newAsset *Asset) (*wire.MsgTx, error) { type MockGroupTxBuilder struct{} // BuildGenesisTx constructs a virtual transaction and prevOut that represent -// the genesis state transition for a grouped asset. This ouput is used to +// the genesis state transition for a grouped asset. This output is used to // create a group witness for the grouped asset. func (m *MockGroupTxBuilder) BuildGenesisTx(newAsset *Asset) (*wire.MsgTx, *wire.TxOut, error) { diff --git a/commitment/commitment_test.go b/commitment/commitment_test.go index ba23dcb6f..5aa2a08bf 100644 --- a/commitment/commitment_test.go +++ b/commitment/commitment_test.go @@ -1026,7 +1026,7 @@ func TestUpdateAssetCommitment(t *testing.T) { require.Equal(t, testCase.err, err) // Verify the number of assets in the updated AssetCommitment, - // as well as the inlcusion of an inserted asset or non-inclusion + // as well as the inclusion of an inserted asset or non-inclusion // of a deleted asset. if testCase.err == nil { switch testCase.numAssets { diff --git a/itest/loadtest/mint_batch_test.go b/itest/loadtest/mint_batch_test.go index b8eed45e4..883e56b0b 100644 --- a/itest/loadtest/mint_batch_test.go +++ b/itest/loadtest/mint_batch_test.go @@ -50,7 +50,7 @@ func mintTest(t *testing.T, ctx context.Context, cfg *Config) { // already are. initialGroups := itest.NumGroups(t, alice) - // Each asset in the batch will share a name and metdata preimage, that + // Each asset in the batch will share a name and metadata preimage, that // will be updated based on the asset's index in the batch. collectibleRequestTemplate := mintrpc.MintAssetRequest{ Asset: &mintrpc.MintAsset{ diff --git a/proof/courier.go b/proof/courier.go index f161b8190..19be60df4 100644 --- a/proof/courier.go +++ b/proof/courier.go @@ -476,7 +476,7 @@ func (h *HashMailBox) RecvAck(ctx context.Context, sid streamID) error { return fmt.Errorf("expected ack, got %x", msg.Msg) } -// CleanUp atempts to tear down the mailbox as specified by the passed sid. +// CleanUp attempts to tear down the mailbox as specified by the passed sid. func (h *HashMailBox) CleanUp(ctx context.Context, sid streamID) error { streamAuth := &hashmailrpc.CipherBoxAuth{ Desc: &hashmailrpc.CipherBoxDesc{ @@ -1230,7 +1230,7 @@ func (c *UniverseRpcCourier) ReceiveProof(ctx context.Context, return err } if err != nil { - return fmt.Errorf("error retreving proof "+ + return fmt.Errorf("error retrieving proof "+ "from universe courier service: %w", err) } diff --git a/rpcserver.go b/rpcserver.go index a89b674d0..e337a0a8a 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -973,7 +973,7 @@ func (r *rpcServer) ListBalances(ctx context.Context, } } -// ListTransfers lists all asset transfers managed by this deamon. +// ListTransfers lists all asset transfers managed by this daemon. func (r *rpcServer) ListTransfers(ctx context.Context, _ *taprpc.ListTransfersRequest) (*taprpc.ListTransfersResponse, error) { @@ -3407,7 +3407,7 @@ func (r *rpcServer) AssetLeafKeys(ctx context.Context, return nil, err } - // If the proof type wasn't speciifed, then we'll return an error as we + // If the proof type wasn't specified, then we'll return an error as we // don't know which keys to actually fetch. if universeID.ProofType == universe.ProofTypeUnspecified { return nil, fmt.Errorf("proof type must be specified") diff --git a/tapdb/assets_store_test.go b/tapdb/assets_store_test.go index 331ea11c1..def25589a 100644 --- a/tapdb/assets_store_test.go +++ b/tapdb/assets_store_test.go @@ -1603,7 +1603,7 @@ func TestAssetGroupKeyUpsert(t *testing.T) { require.Equal(t, witness, groupInfo.WitnessStack) } -// TestFetchGroupedAssets tests that the FetchGroupedAssets query corectly +// TestFetchGroupedAssets tests that the FetchGroupedAssets query correctly // excludes assets with nil group keys, groups assets with matching group // keys, and returns other asset fields accurately. func TestFetchGroupedAssets(t *testing.T) { diff --git a/tapgarden/custodian_test.go b/tapgarden/custodian_test.go index 21f9276c9..3722b34c2 100644 --- a/tapgarden/custodian_test.go +++ b/tapgarden/custodian_test.go @@ -348,7 +348,7 @@ func TestBookAssetSyncer(t *testing.T) { // TODO(jhb): remove asset from syncer, assert that address creation // for the same asset works - // If the asset syncer returns an error, that should propogate up to + // If the asset syncer returns an error, that should propagate up to // the address creator. h.syncer.FetchErrs = true diff --git a/tapgarden/planter_test.go b/tapgarden/planter_test.go index a3a933b6f..47aeba183 100644 --- a/tapgarden/planter_test.go +++ b/tapgarden/planter_test.go @@ -1116,7 +1116,7 @@ func testFinalizeBatch(t *mintingTestHarness) { require.NoError(t, err) // If the caretaker failed, there should be no active caretakers nor - // pending batch. The caretaker error should be propogated to the caller + // pending batch. The caretaker error should be propagated to the caller // of finalize. t.assertNoPendingBatch() t.assertNumCaretakersActive(caretakerCount) @@ -1131,7 +1131,7 @@ func testFinalizeBatch(t *mintingTestHarness) { // Finalize the pending batch to start a caretaker, and progress the // caretaker to TX confirmation. The finalize call should report no - // error, but the caretaker should propogate the confirmation error to + // error, but the caretaker should propagate the confirmation error to // the shared error channel. t.finalizeBatch(&wg, respChan) batchCount++ diff --git a/tappsbt/decode.go b/tappsbt/decode.go index bc81961f9..7840512e7 100644 --- a/tappsbt/decode.go +++ b/tappsbt/decode.go @@ -428,7 +428,7 @@ func findCustomFieldsByKeyPrefix(customFields []*customPsbtField, } } - return nil, fmt.Errorf("%w: key %x not found in list of unkonwns", + return nil, fmt.Errorf("%w: key %x not found in list of unknowns", ErrKeyNotFound, keyPrefix) }