Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func makeFullNode(ctx *cli.Context) *node.Node {

if ctx.IsSet(utils.DeveloperFlag.Name) {
// Start dev mode.
simBeacon, err := catalyst.NewSimulatedBeacon(ctx.Uint64(utils.DeveloperPeriodFlag.Name), eth)
simBeacon, err := catalyst.NewSimulatedBeacon(ctx.Uint64(utils.DeveloperPeriodFlag.Name), cfg.Eth.Miner.PendingFeeRecipient, eth)
if err != nil {
utils.Fatalf("failed to register dev mode catalyst service: %v", err)
}
Expand Down
7 changes: 5 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1742,8 +1742,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
// the miner will fail to start.
cfg.Miner.PendingFeeRecipient = developer.Address

if err := ks.Unlock(developer, passphrase); err != nil {
Fatalf("Failed to unlock developer account: %v", err)
// try to unlock the first keystore account
if len(ks.Accounts()) > 0 {
if err := ks.Unlock(developer, passphrase); err != nil {
Fatalf("Failed to unlock developer account: %v", err)
}
}
log.Info("Using developer account", "address", developer.Address)

Expand Down
3 changes: 2 additions & 1 deletion eth/catalyst/simulated_beacon.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func payloadVersion(config *params.ChainConfig, time uint64) engine.PayloadVersi
}

// NewSimulatedBeacon constructs a new simulated beacon chain.
func NewSimulatedBeacon(period uint64, eth *eth.Ethereum) (*SimulatedBeacon, error) {
func NewSimulatedBeacon(period uint64, feeRecipient common.Address, eth *eth.Ethereum) (*SimulatedBeacon, error) {
block := eth.BlockChain().CurrentBlock()
current := engine.ForkchoiceStateV1{
HeadBlockHash: block.Hash(),
Expand All @@ -131,6 +131,7 @@ func NewSimulatedBeacon(period uint64, eth *eth.Ethereum) (*SimulatedBeacon, err
engineAPI: engineAPI,
lastBlockTime: block.Time,
curForkchoiceState: current,
feeRecipient: feeRecipient,
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion eth/catalyst/simulated_beacon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func startSimulatedBeaconEthService(t *testing.T, genesis *core.Genesis, period
t.Fatal("can't create eth service:", err)
}

simBeacon, err := NewSimulatedBeacon(period, ethservice)
simBeacon, err := NewSimulatedBeacon(period, common.Address{}, ethservice)
if err != nil {
t.Fatal("can't create simulated beacon:", err)
}
Expand Down
2 changes: 1 addition & 1 deletion ethclient/simulated/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func newWithNode(stack *node.Node, conf *eth.Config, blockPeriod uint64) (*Backe
return nil, err
}
// Set up the simulated beacon
beacon, err := catalyst.NewSimulatedBeacon(blockPeriod, backend)
beacon, err := catalyst.NewSimulatedBeacon(blockPeriod, common.Address{}, backend)
if err != nil {
return nil, err
}
Expand Down