Skip to content

Commit

Permalink
Buck review changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
martonp committed Mar 23, 2024
1 parent dc90406 commit ddf4cbf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions client/asset/btc/btc.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ type baseWallet struct {

// subprocessWg must be incremented every time the wallet starts a
// goroutine that will use node or the tx history DB.
subprocessWg *sync.WaitGroup
subprocessWg sync.WaitGroup
}

func (w *baseWallet) fallbackFeeRate() uint64 {
Expand Down Expand Up @@ -1263,7 +1263,6 @@ func newUnconnectedWallet(cfg *BTCCloneCFG, walletCfg *WalletConfig) (*baseWalle
pendingTxs: make(map[chainhash.Hash]ExtendedWalletTx),
walletDir: walletDir,
ar: addressRecyler,
subprocessWg: new(sync.WaitGroup),
}
w.cfgV.Store(baseCfg)

Expand Down
9 changes: 1 addition & 8 deletions client/asset/dcr/dcr.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ type ExchangeWallet struct {

// subprocessWg must be incremented every time the wallet starts a
// goroutine that will use node or the tx history DB.
subprocessWg *sync.WaitGroup
subprocessWg sync.WaitGroup
}

func (dcr *ExchangeWallet) config() *exchangeWalletConfig {
Expand Down Expand Up @@ -768,12 +768,6 @@ func NewWallet(cfg *asset.WalletConfig, logger dex.Logger, network dex.Network)
if err != nil {
return nil, err
}
path := filepath.Join(cfg.DataDir, chainParams.Name, "txhistory.db")
txHistoryDB, err := btc.NewBadgerTxDB(path, dcr.log.SubLogger("TXHISTORYDB"))
if err != nil {
return nil, fmt.Errorf("failed to create tx history db: %v", err)
}
dcr.txHistoryDB.Store(txHistoryDB)
default:
makeCustomWallet, ok := customWalletConstructors[cfg.Type]
if !ok {
Expand Down Expand Up @@ -857,7 +851,6 @@ func unconnectedWallet(cfg *asset.WalletConfig, dcrCfg *walletConfig, chainParam
subsidyCache: blockchain.NewSubsidyCache(chainParams),
pendingTxs: make(map[chainhash.Hash]*btc.ExtendedWalletTx),
walletDir: dir,
subprocessWg: new(sync.WaitGroup),
}

if b, err := os.ReadFile(vspFilepath); err == nil {
Expand Down
3 changes: 1 addition & 2 deletions client/asset/eth/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ type baseWallet struct {

// subprocessWg must be incremented every time the wallet starts a
// goroutine that will use node or the tx history DB.
subprocessWg *sync.WaitGroup
subprocessWg sync.WaitGroup
}

// assetWallet is a wallet backend for Ethereum and Eth tokens. The backend is
Expand Down Expand Up @@ -709,7 +709,6 @@ func NewEVMWallet(cfg *EVMWalletConfig) (w *ETHWallet, err error) {
pendingTxs: make(map[uint64]*extendedWalletTx),
// Can be empty
multiBalanceAddress: cfg.MultiBalAddress,
subprocessWg: new(sync.WaitGroup),
}

var maxSwapGas, maxRedeemGas uint64
Expand Down

0 comments on commit ddf4cbf

Please sign in to comment.