Skip to content

Commit

Permalink
Add an hot fix to attribute an ID to oracle spec for start up markets
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinTrinque committed Apr 26, 2021
1 parent 2e2ca40 commit 4f8335b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/vega/node/node_pre.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
"code.vegaprotocol.io/vega/pprof"
"code.vegaprotocol.io/vega/processor"
"code.vegaprotocol.io/vega/proto"
oraclepb "code.vegaprotocol.io/vega/proto/oracles/v1"
"code.vegaprotocol.io/vega/risk"
"code.vegaprotocol.io/vega/stats"
"code.vegaprotocol.io/vega/storage"
Expand Down Expand Up @@ -284,6 +285,13 @@ func (l *NodeCommand) UponGenesis(ctx context.Context, rawstate []byte) error {
if len(l.mktscfg) > 0 {
for _, mkt := range l.mktscfg {
mkt := mkt

// hot fix: attribute an ID to oracle spec to avoid blank ID
spec := mkt.TradableInstrument.Instrument.GetFuture().OracleSpec
specWithID := oraclepb.NewOracleSpec(spec.PubKeys, spec.Filters)
mkt.TradableInstrument.Instrument.GetFuture().OracleSpec = specWithID
// end of hot fix

err = l.executionEngine.SubmitMarket(l.ctx, &mkt)
if err != nil {
l.Log.Panic("Unable to submit market",
Expand Down

0 comments on commit 4f8335b

Please sign in to comment.