Skip to content

Commit

Permalink
disable bootnode in stress test (ethereum#54)
Browse files Browse the repository at this point in the history
Co-authored-by: blockchaindevsh <blockchaindevsh@google.com>
  • Loading branch information
blockchaindevsh and blockchaindevsh authored Mar 18, 2022
1 parent 3c4a43c commit 6a9df50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions consensus/tendermint/tendermint.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func (c *Tendermint) Authorize(signer common.Address, signFn SignerFn) {
c.lock.Lock()
defer c.lock.Unlock()

log.Info("Authorize", "signer", signer)
c.privVal = NewEthPrivValidator(signer, signFn)
}

Expand Down
13 changes: 13 additions & 0 deletions miner/stress/tendermint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ func main() {
for i := 0; i < len(sealers); i++ {
sealers[i], _ = crypto.GenerateKey()
}

// Create a Clique network based off of the Rinkeby config
genesis := makeGenesis(faucets, sealers)

log.Warn("genesis", "NextValidators", genesis.NextValidators)

// Handle interrupts.
interruptCh := make(chan os.Signal, 5)
signal.Notify(interruptCh, os.Interrupt)
Expand Down Expand Up @@ -119,6 +122,15 @@ func main() {
// Connect libp2p
tm := node.Engine().(*tendermint.Tendermint)
for {
select {
case <-interruptCh:
for _, node := range stacks {
node.Close()
}
return
default:
}

if tm.P2pServer() == nil {
log.Info("P2pServer nil")
time.Sleep(250 * time.Millisecond)
Expand Down Expand Up @@ -222,6 +234,7 @@ func makeGenesis(faucets []*ecdsa.PrivateKey, sealers []*ecdsa.PrivateKey) *core
genesis := core.DefaultWeb3QGalileoGenesisBlock()
genesis.GasLimit = 25000000
genesis.Config.Tendermint.P2pPort = 0
genesis.Config.Tendermint.P2pBootstrap = ""

genesis.Alloc = core.GenesisAlloc{}
for _, faucet := range faucets {
Expand Down

0 comments on commit 6a9df50

Please sign in to comment.