Skip to content

Commit

Permalink
update String implements: ECCPOW
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Sep 26, 2022
1 parent b7668bd commit 1b7b08c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/evm/internal/t8ntool/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ func readInput(ctx *cli.Context) (*bbInput, error) {
ethashMode = ctx.String(SealEthashModeFlag.Name)
inputData = &bbInput{}
)

//need to update.
if ethashOn && eccpowOn && cliqueStr != "" {
return nil, NewError(ErrorConfig, fmt.Errorf("ethash and clique, eccpow sealing specified, only one may be chosen"))
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/puppeth/wizard_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (w *wizard) deployNode(boot bool) {
}
}
} else if w.conf.Genesis.Config.Eccpow != nil {
// Ethash based miners only need an etherbase to mine against
// Eccpow based miners only need an etherbase to mine against
fmt.Println()
if infos.etherbase == "" {
fmt.Printf("What address should the miner use?\n")
Expand Down
8 changes: 8 additions & 0 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,14 @@ func (c *ChainConfig) String() string {
} else {
banner += "Consensus: Beacon (proof-of-stake), merged from Clique (proof-of-authority)\n"
}
case c.Eccpow != nil:
if c.TerminalTotalDifficulty == nil {
banner += "Consensus: Eccpow (proof-of-work)\n"
} else if !c.TerminalTotalDifficultyPassed {
banner += "Consensus: Beacon (proof-of-stake), merging from Eccpow (proof-of-work)\n"
} else {
banner += "Consensus: Beacon (proof-of-stake), merged from Eccpow (proof-of-work)\n"
}
default:
banner += "Consensus: unknown\n"
}
Expand Down

0 comments on commit 1b7b08c

Please sign in to comment.