Skip to content

Commit bcc86e8

Browse files
committed
multi: fix typos and formatting
1 parent e54fed2 commit bcc86e8

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

itest/assertions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ func AssertBalanceByID(t *testing.T, client taprpc.TaprootAssetsClient,
870870
}
871871

872872
require.True(t, ok)
873-
require.Equal(t, uint64(amt), uint64(balance.Balance))
873+
require.Equal(t, amt, balance.Balance)
874874
}
875875

876876
// AssertBalanceByGroup asserts that the balance of a single asset group

itest/universe_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,15 @@ import (
1111

1212
"github.com/btcsuite/btcd/btcec/v2"
1313
"github.com/btcsuite/btcd/btcec/v2/schnorr"
14-
"github.com/lightninglabs/taproot-assets/internal/test"
15-
1614
tap "github.com/lightninglabs/taproot-assets"
1715
"github.com/lightninglabs/taproot-assets/asset"
1816
"github.com/lightninglabs/taproot-assets/fn"
17+
"github.com/lightninglabs/taproot-assets/internal/test"
1918
"github.com/lightninglabs/taproot-assets/mssmt"
2019
"github.com/lightninglabs/taproot-assets/taprpc"
2120
"github.com/lightninglabs/taproot-assets/taprpc/mintrpc"
2221
unirpc "github.com/lightninglabs/taproot-assets/taprpc/universerpc"
2322
"github.com/lightninglabs/taproot-assets/universe"
24-
2523
"github.com/lightningnetwork/lnd/lntest/wait"
2624
"github.com/stretchr/testify/require"
2725
"golang.org/x/exp/maps"

proof/verifier.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ func (p *Proof) verifyGenesisReveal() error {
327327

328328
// verifyGenesisGroupKey verifies that the group key attached to the asset in
329329
// this proof has already been verified.
330-
func (p *Proof) verfyGenesisGroupKey(groupVerifier GroupVerifier) error {
330+
func (p *Proof) verifyGenesisGroupKey(groupVerifier GroupVerifier) error {
331331
groupKey := p.Asset.GroupKey.GroupPubKey
332332
err := groupVerifier(&groupKey)
333333
if err != nil {
@@ -487,7 +487,7 @@ func (p *Proof) Verify(ctx context.Context, prev *AssetSnapshot,
487487
case isGenesisAsset && hasGroupKey && !hasGroupKeyReveal:
488488
// A reissuance must be for an asset group that has already
489489
// been imported and verified.
490-
if err := p.verfyGenesisGroupKey(groupVerifier); err != nil {
490+
if err := p.verifyGenesisGroupKey(groupVerifier); err != nil {
491491
return nil, err
492492
}
493493

@@ -500,7 +500,7 @@ func (p *Proof) Verify(ctx context.Context, prev *AssetSnapshot,
500500
// 7. Verify group key for asset transfers. Any asset with a group key
501501
// must carry a group key that has already been imported and verified.
502502
if !isGenesisAsset && hasGroupKey {
503-
if err := p.verfyGenesisGroupKey(groupVerifier); err != nil {
503+
if err := p.verifyGenesisGroupKey(groupVerifier); err != nil {
504504
return nil, err
505505
}
506506
}

tapgarden/caretaker.go

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/btcsuite/btcd/wire"
1818
"github.com/davecgh/go-spew/spew"
1919
"github.com/lightninglabs/neutrino/cache/lru"
20-
2120
"github.com/lightninglabs/taproot-assets/asset"
2221
"github.com/lightninglabs/taproot-assets/commitment"
2322
"github.com/lightninglabs/taproot-assets/fn"
@@ -1336,14 +1335,13 @@ func newSingleValue[T any](v T) singleCacheValue[T] {
13361335
// is used more as a set.
13371336
type emptyCacheVal = singleCacheValue[emptyVal]
13381337

1339-
// GenGroupVeifier generates a group key verification callback function given a
1338+
// GenGroupVerifier generates a group key verification callback function given a
13401339
// DB handle.
13411340
func GenGroupVerifier(ctx context.Context,
13421341
mintingStore MintingStore) func(*btcec.PublicKey) error {
13431342

13441343
// Cache known group keys that were previously fetched.
1345-
assetGroups := lru.NewCache[
1346-
asset.SerializedKey, emptyCacheVal](
1344+
assetGroups := lru.NewCache[asset.SerializedKey, emptyCacheVal](
13471345
assetGroupCacheSize,
13481346
)
13491347

@@ -1360,9 +1358,7 @@ func GenGroupVerifier(ctx context.Context,
13601358

13611359
// This query will err if no stored group has a matching
13621360
// tweaked group key.
1363-
_, err = mintingStore.FetchGroupByGroupKey(
1364-
ctx, groupKey,
1365-
)
1361+
_, err = mintingStore.FetchGroupByGroupKey(ctx, groupKey)
13661362
if err != nil {
13671363
return fmt.Errorf("%x: group verifier: %v: %w",
13681364
assetGroupKey[:], err, ErrGroupKeyUnknown)
@@ -1377,12 +1373,12 @@ func GenGroupVerifier(ctx context.Context,
13771373
// GenGroupAnchorVerifier generates a caching group anchor verification
13781374
// callback function given a DB handle.
13791375
func GenGroupAnchorVerifier(ctx context.Context,
1380-
mintingStore MintingStore) func(*asset.Genesis,
1381-
*asset.GroupKey) error {
1376+
mintingStore MintingStore) func(*asset.Genesis, *asset.GroupKey) error {
13821377

13831378
// Cache anchors for groups that were previously fetched.
13841379
groupAnchors := lru.NewCache[
1385-
asset.SerializedKey, singleCacheValue[*asset.Genesis]](
1380+
asset.SerializedKey, singleCacheValue[*asset.Genesis],
1381+
](
13861382
assetGroupCacheSize,
13871383
)
13881384

0 commit comments

Comments
 (0)