Skip to content

Commit

Permalink
multi: remove config param AcceptRemoteUniverseProofs
Browse files Browse the repository at this point in the history
We can remove this parameter and use the macaroon whitelist to control
this behaviour.
  • Loading branch information
ffranr committed Sep 19, 2023
1 parent a488519 commit 0d72a61
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
2 changes: 0 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ type Config struct {
// connecting to itself as a federation member.
RuntimeID int64

AcceptRemoteUniverseProofs bool

// TODO(roasbeef): use the Taproot Asset chain param wrapper here?
ChainParams chaincfg.Params

Expand Down
2 changes: 0 additions & 2 deletions itest/tapd_harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ func newTapdHarness(t *testing.T, ht *harnessTest, cfg tapdConfig,
// also used within some tests for transferring proofs.
tapCfg.RpcConf.AllowPublicUniProofCourier = true

tapCfg.Universe.AcceptRemoteProofs = true

// Decide which DB backend to use.
switch *dbbackend {
case tapcfg.DatabaseBackendSqlite:
Expand Down
4 changes: 0 additions & 4 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2921,10 +2921,6 @@ func (r *rpcServer) InsertProof(ctx context.Context,
return nil, fmt.Errorf("key cannot be nil")
}

if !r.cfg.AcceptRemoteUniverseProofs {
return nil, fmt.Errorf("remote proofs not accepted")
}

universeID, err := unmarshalUniID(req.Key.Id)
if err != nil {
return nil, err
Expand Down
3 changes: 1 addition & 2 deletions tapcfg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ func DefaultConfig() Config {
},
},
Universe: &UniverseConfig{
SyncInterval: defaultUniverseSyncInterval,
AcceptRemoteProofs: defaultAcceptRemoteProofs,
SyncInterval: defaultUniverseSyncInterval,
},
}
}
Expand Down
11 changes: 5 additions & 6 deletions tapcfg/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,11 @@ func genServerConfig(cfg *Config, cfgLogger btclog.Logger,
})

return &tap.Config{
DebugLevel: cfg.DebugLevel,
RuntimeID: runtimeID,
AcceptRemoteUniverseProofs: cfg.Universe.AcceptRemoteProofs,
Lnd: lndServices,
ChainParams: cfg.ActiveNetParams,
ReOrgWatcher: reOrgWatcher,
DebugLevel: cfg.DebugLevel,
RuntimeID: runtimeID,
Lnd: lndServices,
ChainParams: cfg.ActiveNetParams,
ReOrgWatcher: reOrgWatcher,
AssetMinter: tapgarden.NewChainPlanter(tapgarden.PlanterConfig{
GardenKit: tapgarden.GardenKit{
Wallet: walletAnchor,
Expand Down

0 comments on commit 0d72a61

Please sign in to comment.