diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 43632d044e..7f4217fa9c 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1252,7 +1252,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) { } if ctx.GlobalIsSet(UseGrapheneFlag.Name) { - cfg.UseGraphene = ctx.GlobalBool(NoGossipFlag.Name) + cfg.UseGraphene = ctx.GlobalBool(UseGrapheneFlag.Name) } } diff --git a/eth/config.go b/eth/config.go index efbaafb6a2..7c48d89ecd 100644 --- a/eth/config.go +++ b/eth/config.go @@ -126,6 +126,9 @@ type Config struct { EWASMInterpreter string // Type of the EVM interpreter ("" for default) EVMInterpreter string + + // Enable graphene protocol + UseGraphene bool } type configMarshaling struct { diff --git a/eth/handler.go b/eth/handler.go index 9f82f9de84..42e37fb27d 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -123,7 +123,7 @@ type ProtocolManager struct { // NewProtocolManager returns a new Ethereum sub protocol manager. The Ethereum sub protocol manages peers capable // with the Ethereum network. -func NewProtocolManager(config *params.ChainConfig, mode downloader.SyncMode, networkID uint64, mux *event.TypeMux, txpool txPool, engine consensus.Engine, blockchain *core.BlockChain, chaindb ethdb.Database, bool useGraphene) (*ProtocolManager, error) { +func NewProtocolManager(config *params.ChainConfig, mode downloader.SyncMode, networkID uint64, mux *event.TypeMux, txpool txPool, engine consensus.Engine, blockchain *core.BlockChain, chaindb ethdb.Database, useGraphene bool) (*ProtocolManager, error) { // Create the protocol manager with the base fields manager := &ProtocolManager{ networkID: networkID,