forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Beacon node setup improvements (ethereum-optimism#9120)
* Beacon node setup improvements * Update op-node/flags/flags.go Co-authored-by: protolambda <[email protected]> * Add option to not half op-node startup on failed check * Update op-node/flags/flags.go Co-authored-by: protolambda <[email protected]> * op-node: improve beacon-API configuration handling --------- Co-authored-by: protolambda <[email protected]>
- Loading branch information
1 parent
8fc0fcb
commit 5c39917
Showing
10 changed files
with
151 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package op_e2e | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/fakebeacon" | ||
"github.com/ethereum-optimism/optimism/op-service/client" | ||
"github.com/ethereum-optimism/optimism/op-service/sources" | ||
"github.com/ethereum-optimism/optimism/op-service/testlog" | ||
"github.com/ethereum/go-ethereum/log" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestGetVersion(t *testing.T) { | ||
l := testlog.Logger(t, log.LvlInfo) | ||
|
||
beaconApi := fakebeacon.NewBeacon(l, t.TempDir(), uint64(0), uint64(0)) | ||
t.Cleanup(func() { | ||
_ = beaconApi.Close() | ||
}) | ||
require.NoError(t, beaconApi.Start("127.0.0.1:0")) | ||
|
||
cl := sources.NewL1BeaconClient(client.NewBasicHTTPClient(beaconApi.BeaconAddr(), l)) | ||
|
||
version, err := cl.GetVersion(context.Background()) | ||
require.NoError(t, err) | ||
require.Equal(t, "fakebeacon 1.2.3", version) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters