Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Fixed wrong init in CasperValidatorService
Browse files Browse the repository at this point in the history
  • Loading branch information
zilm13 committed Mar 13, 2018
1 parent 1f0e5dc commit 0423bbf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ public CasperValidatorService(Ethereum ethereum, SystemProperties config) {

public void init() {
if (Boolean.TRUE.equals(config.getCasperValidatorEnabled())) {
this.coinbase = ECKey.fromPrivate(this.config.getCasperValidatorPrivateKey());
this.depositSize = EtherUtil.convert(this.config.getCasperValidatorDeposit(), EtherUtil.Unit.ETHER);
start();
}
}

public synchronized void start() {
if (!started) {
this.coinbase = ECKey.fromPrivate(this.config.getCasperValidatorPrivateKey());
this.depositSize = EtherUtil.convert(this.config.getCasperValidatorDeposit(), EtherUtil.Unit.ETHER);
logger.info("Starting casper validator with coinbase 0x{}", Hex.toHexString(coinbase.getAddress()));
// FIXME: Actually we should listen only to HEAD changes
ethereum.addListener(new EthereumListenerAdapter() {
Expand Down

0 comments on commit 0423bbf

Please sign in to comment.