Skip to content

Commit 3a7797c

Browse files
committed
Make it so flashblock-rpc peer added only if flashblock enabled
1 parent 69976a8 commit 3a7797c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

playground/recipe_opstack.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ func (o *OpRecipe) Apply(ctx *ExContext, artifacts *Artifacts) *Manifest {
7474

7575
flashblocksBuilderURLRef := o.flashblocksBuilderURL
7676
externalBuilderRef := o.externalBuilder
77+
peers := []string{}
7778

7879
opGeth := &OpGeth{}
7980
svcManager.AddService("op-geth", opGeth)
@@ -100,11 +101,13 @@ func (o *OpRecipe) Apply(ctx *ExContext, artifacts *Artifacts) *Manifest {
100101
flashblocksBuilderURLRef = ConnectWs("op-rbuilder", "flashblocks")
101102
}
102103

104+
if o.flashblocks {
105+
peers = append(peers, "flashblocks-rpc")
106+
}
107+
103108
svcManager.AddService("bproxy", &BProxy{
104109
TargetAuthrpc: externalBuilderRef,
105-
Peers: []string{
106-
"flashblocks-rpc",
107-
},
110+
Peers: peers,
108111
Flashblocks: o.flashblocks,
109112
FlashblocksBuilderURL: flashblocksBuilderURLRef,
110113
})

0 commit comments

Comments
 (0)