@@ -20,13 +20,9 @@ import (
2020 "testing"
2121
2222 "github.com/ethereum/go-ethereum/common"
23- "github.com/ethereum/go-ethereum/consensus"
2423 "github.com/ethereum/go-ethereum/consensus/istanbul"
25- "github.com/ethereum/go-ethereum/core/state"
26- "github.com/ethereum/go-ethereum/core/types"
2724 "github.com/ethereum/go-ethereum/p2p"
2825 "github.com/ethereum/go-ethereum/rlp"
29- "github.com/ethereum/go-ethereum/rpc"
3026 lru "github.com/hashicorp/golang-lru"
3127)
3228
@@ -74,64 +70,3 @@ func makeMsg(msgcode uint64, data interface{}) p2p.Msg {
7470 size , r , _ := rlp .EncodeToReader (data )
7571 return p2p.Msg {Code : msgcode , Size : uint32 (size ), Payload : r }
7672}
77-
78- type MockIstanbulEngine struct {}
79-
80- func (m * MockIstanbulEngine ) Author (header * types.Header ) (common.Address , error ) {
81- return common.Address {}, nil
82- }
83-
84- func (m * MockIstanbulEngine ) VerifyHeader (chain consensus.ChainReader , header * types.Header , seal bool ) error {
85- return nil
86- }
87-
88- func (m * MockIstanbulEngine ) VerifyHeaders (chain consensus.ChainReader , headers []* types.Header , seals []bool ) (chan <- struct {}, <- chan error ) {
89- abort := make (chan struct {})
90- results := make (chan error , len (headers ))
91- go func () {
92- for _ = range headers {
93- results <- nil
94- }
95- }()
96- return abort , results
97- }
98-
99- func (m * MockIstanbulEngine ) VerifyUncles (chain consensus.ChainReader , block * types.Block ) error {
100- return nil
101- }
102-
103- func (m * MockIstanbulEngine ) VerifySeal (chain consensus.ChainReader , header * types.Header ) error {
104- return nil
105- }
106-
107- func (m * MockIstanbulEngine ) Prepare (chain consensus.ChainReader , header * types.Header ) error {
108- return nil
109- }
110-
111- func (m * MockIstanbulEngine ) Finalize (chain consensus.ChainReader , header * types.Header , state * state.StateDB , txs []* types.Transaction , uncles []* types.Header , receipts []* types.Receipt ) (* types.Block , error ) {
112- return nil , nil
113- }
114-
115- func (m * MockIstanbulEngine ) Seal (chain consensus.ChainReader , block * types.Block , stop <- chan struct {}) (* types.Block , error ) {
116- return nil , nil
117- }
118-
119- func (m * MockIstanbulEngine ) APIs (chain consensus.ChainReader ) []rpc.API {
120- return []rpc.API {}
121- }
122-
123- func (m * MockIstanbulEngine ) HandleMsg (addr common.Address , data []byte ) error {
124- return nil
125- }
126-
127- func (m * MockIstanbulEngine ) NewChainHead (block * types.Block ) error {
128- return nil
129- }
130-
131- func (m * MockIstanbulEngine ) Start (chain consensus.ChainReader , inserter func (types.Blocks ) (int , error )) error {
132- return nil
133- }
134-
135- func (m * MockIstanbulEngine ) Stop () error {
136- return nil
137- }
0 commit comments