File tree 8 files changed +4
-87
lines changed
8 files changed +4
-87
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ type Producer struct {
13
13
Coinbase string `json:"Coinbase"`
14
14
EntropyStorePath string `json:"EntropyStorePath"`
15
15
16
- ExternalMiner bool `json:"externalMiner"`
17
-
18
16
coinbase types.Address
19
17
index uint32
20
18
}
Original file line number Diff line number Diff line change 18
18
" util" ,
19
19
" debug" ,
20
20
" sbpstats" ,
21
- " miner" ,
22
21
" wallet"
23
22
],
24
23
"Miner" : true ,
25
- "ExternalMiner" : true ,
26
24
"CoinBase" : " 0:vite_3167c9421c8a4cb642d613082dfcef932e26063867f277ec0f" ,
27
25
"EntropyStorePath" : " /root/conf/evm/vite_3167c9421c8a4cb642d613082dfcef932e26063867f277ec0f" ,
28
26
"EntropyStorePassword" : " 123456" ,
Original file line number Diff line number Diff line change 1
1
package consensus
2
2
3
3
type ConsensusCfg struct {
4
- EnablePuppet bool
5
4
}
6
5
7
6
func DefaultCfg () * ConsensusCfg {
8
- return & ConsensusCfg {
9
- EnablePuppet : false ,
10
- }
7
+ return & ConsensusCfg {}
11
8
}
12
9
13
- func Cfg (enablePuppet bool ) * ConsensusCfg {
14
- return & ConsensusCfg {EnablePuppet : enablePuppet }
10
+ func Cfg () * ConsensusCfg {
11
+ return & ConsensusCfg {}
15
12
}
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ import (
12
12
)
13
13
14
14
func (cs * consensus ) VerifySnapshotProducer (header * ledger.SnapshotBlock ) (bool , error ) {
15
- if cs .EnablePuppet {
16
- return true , nil
17
- }
18
15
cs .snapshot .verifyProducerAndSeed (header )
19
16
return cs .snapshot .VerifyProducer (header .Producer (), * header .Timestamp )
20
17
}
@@ -116,12 +113,6 @@ func (cs *consensus) Init(cfg *ConsensusCfg) error {
116
113
cs .rw .init (snapshot )
117
114
118
115
cs .tg = newTrigger (cs .rollback )
119
- if cfg .EnablePuppet {
120
- sub := newSubscriberPuppet (cs .Subscriber , cs .snapshot )
121
- cs .Subscriber = sub
122
- cs .subscribeTrigger = sub
123
- }
124
-
125
116
cs .contracts = newContractCs (cs .rw , cs .mLog )
126
117
err := cs .contracts .LoadGid (types .DELEGATE_GID )
127
118
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ type Config struct {
63
63
EntropyStorePassword string `json:"EntropyStorePassword"`
64
64
CoinBase string `json:"CoinBase"`
65
65
MinerEnabled bool `json:"Miner"`
66
- ExternalMiner bool `json:"ExternalMiner"`
67
66
68
67
//rpc
69
68
RPCEnabled bool `json:"RPCEnabled"`
@@ -193,7 +192,6 @@ func (c *Config) MakeMinerConfig() *config.Producer {
193
192
Producer : c .MinerEnabled ,
194
193
Coinbase : c .CoinBase ,
195
194
EntropyStorePath : c .EntropyStorePath ,
196
- ExternalMiner : c .ExternalMiner ,
197
195
}
198
196
err := cfg .Parse ()
199
197
if err != nil {
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package api
2
2
3
3
import (
4
4
"errors"
5
- "fmt"
6
5
7
6
"github.com/vitelabs/go-vite/v2"
8
7
"github.com/vitelabs/go-vite/v2/common/upgrade"
@@ -29,12 +28,6 @@ func (api VirtualApi) String() string {
29
28
}
30
29
31
30
func (api * VirtualApi ) Mine () error {
32
- if ! api .vite .Config ().IsMine () {
33
- return fmt .Errorf ("should enable mine" )
34
- }
35
- if ! api .vite .Config ().ExternalMiner {
36
- return fmt .Errorf ("should enable external miner" )
37
- }
38
31
return api .vite .Producer ().SnapshotOnce ()
39
32
}
40
33
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ func (v *Vite) Start() (err error) {
124
124
125
125
v .chain .Start ()
126
126
127
- err = v .consensus .Init (consensus .Cfg (v . Config (). Producer . ExternalMiner ))
127
+ err = v .consensus .Init (consensus .Cfg ())
128
128
if err != nil {
129
129
return err
130
130
}
You can’t perform that action at this time.
0 commit comments