Skip to content

Commit ecca3dd

Browse files
committed
tapcfg: enable orphan utxo sweeping by default
1 parent a0e0cbe commit ecca3dd

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

itest/tapd_harness.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ func newTapdHarness(t *testing.T, ht *harnessTest, cfg tapdConfig,
261261
tapCfg.Universe.DisableSupplyVerifierChainWatch = opts.disableSupplyVerifierChainWatch
262262

263263
// Pass through the sweep orphan UTXOs flag. If the option was not set,
264-
// this will be false, which is the default.
264+
// this will be false. Note: The production default is true, but we
265+
// disable it by default in tests to avoid interference with test
266+
// assertions unless explicitly enabled via WithSweepOrphanUtxos().
265267
tapCfg.Wallet.SweepOrphanUtxos = opts.sweepOrphanUtxos
266268

267269
switch {

sample-tapd.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@
417417
; wallet.psbt-max-fee-ratio=0.75
418418

419419
; Sweep orphaned UTXOs into send and burn anchor transactions.
420-
; Disabled by default.
421-
; wallet.sweep-orphan-utxos=false
420+
; Enabled by default.
421+
; wallet.sweep-orphan-utxos=true
422422

423423
[address]
424424

tapcfg/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ type WalletConfig struct {
297297

298298
// SweepOrphanUtxos, when true, sweeps orphaned UTXOs into anchor
299299
// transactions created during sends and burns.
300-
SweepOrphanUtxos bool `long:"sweep-orphan-utxos" description:"Sweep orphaned UTXOs into anchor transactions created during sends and burns. Disabled by default."`
300+
SweepOrphanUtxos bool `long:"sweep-orphan-utxos" description:"Sweep orphaned UTXOs into anchor transactions created during sends and burns. Enabled by default."`
301301
}
302302

303303
// UniverseConfig is the config that houses any Universe related config
@@ -498,7 +498,7 @@ func DefaultConfig() Config {
498498
},
499499
Wallet: &WalletConfig{
500500
PsbtMaxFeeRatio: DefaultPsbtMaxFeeRatio,
501-
SweepOrphanUtxos: false,
501+
SweepOrphanUtxos: true,
502502
},
503503
AddrBook: &AddrBookConfig{
504504
DisableSyncer: false,

0 commit comments

Comments
 (0)