Commit 9e7ec4dd authored by inphi's avatar inphi

log invalid preimage key request in test

parent 665cb531
...@@ -3,6 +3,7 @@ package client ...@@ -3,6 +3,7 @@ package client
import ( import (
"encoding/binary" "encoding/binary"
"encoding/json" "encoding/json"
"fmt"
"testing" "testing"
"github.com/ethereum-optimism/optimism/op-node/chaincfg" "github.com/ethereum-optimism/optimism/op-node/chaincfg"
...@@ -74,13 +75,13 @@ func (o *mockBoostrapOracle) Get(key preimage.Key) []byte { ...@@ -74,13 +75,13 @@ func (o *mockBoostrapOracle) Get(key preimage.Key) []byte {
return binary.BigEndian.AppendUint64(nil, o.b.L2ChainID) return binary.BigEndian.AppendUint64(nil, o.b.L2ChainID)
case L2ChainConfigLocalIndex.PreimageKey(): case L2ChainConfigLocalIndex.PreimageKey():
if !o.custom { if !o.custom {
panic("unexpected key") panic(fmt.Sprintf("unexpected oracle request for preimage key %x", key.PreimageKey()))
} }
b, _ := json.Marshal(o.b.L2ChainConfig) b, _ := json.Marshal(o.b.L2ChainConfig)
return b return b
case RollupConfigLocalIndex.PreimageKey(): case RollupConfigLocalIndex.PreimageKey():
if !o.custom { if !o.custom {
panic("unexpected key") panic(fmt.Sprintf("unexpected oracle request for preimage key %x", key.PreimageKey()))
} }
b, _ := json.Marshal(o.b.RollupConfig) b, _ := json.Marshal(o.b.RollupConfig)
return b return b
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment