mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
rm : interrupt + sleep
This commit is contained in:
parent
5067c6cdeb
commit
a2dc545fac
1 changed files with 0 additions and 21 deletions
|
|
@ -8,7 +8,6 @@ import (
|
|||
"io/ioutil"
|
||||
"math/big"
|
||||
"os"
|
||||
"os/signal"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
|
@ -133,10 +132,6 @@ func TestValidatorWentOffline(t *testing.T) {
|
|||
// Create an Ethash network based off of the Ropsten config
|
||||
genesis := initGenesis(t, faucets)
|
||||
|
||||
// Handle interrupts.
|
||||
interruptCh := make(chan os.Signal, 5)
|
||||
signal.Notify(interruptCh, os.Interrupt)
|
||||
|
||||
var (
|
||||
stacks []*node.Node
|
||||
nodes []*eth.Ethereum
|
||||
|
|
@ -171,20 +166,6 @@ func TestValidatorWentOffline(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
go func() {
|
||||
for {
|
||||
// Stop when interrupted.
|
||||
select {
|
||||
case <-interruptCh:
|
||||
for _, node := range stacks {
|
||||
node.Close()
|
||||
}
|
||||
return
|
||||
default:
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
for {
|
||||
|
||||
// for block 1 to 8, the primary validator is node0
|
||||
|
|
@ -212,8 +193,6 @@ func TestValidatorWentOffline(t *testing.T) {
|
|||
break
|
||||
}
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
}
|
||||
|
||||
// check block 10 miner ; expected author is node1 signer
|
||||
|
|
|
|||
Loading…
Reference in a new issue