aboutsummaryrefslogtreecommitdiffstats
path: root/simulation
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-09-26 17:13:37 +0800
committerGitHub <noreply@github.com>2018-09-26 17:13:37 +0800
commit7450e6ba7f7299d03b04a7e2a9b3bc5911b94cfe (patch)
tree41b823a05f81615558a37567dab85e2958b59329 /simulation
parent663817d3e0d5a3c28cb0c5e378a533e242af5fdf (diff)
downloadtangerine-consensus-7450e6ba7f7299d03b04a7e2a9b3bc5911b94cfe.tar
tangerine-consensus-7450e6ba7f7299d03b04a7e2a9b3bc5911b94cfe.tar.gz
tangerine-consensus-7450e6ba7f7299d03b04a7e2a9b3bc5911b94cfe.tar.bz2
tangerine-consensus-7450e6ba7f7299d03b04a7e2a9b3bc5911b94cfe.tar.lz
tangerine-consensus-7450e6ba7f7299d03b04a7e2a9b3bc5911b94cfe.tar.xz
tangerine-consensus-7450e6ba7f7299d03b04a7e2a9b3bc5911b94cfe.tar.zst
tangerine-consensus-7450e6ba7f7299d03b04a7e2a9b3bc5911b94cfe.zip
crypto: sigtopub to crypto package. remove SigToPubFn (#141)
Diffstat (limited to 'simulation')
-rw-r--r--simulation/node.go5
-rw-r--r--simulation/simulation.go2
2 files changed, 2 insertions, 5 deletions
diff --git a/simulation/node.go b/simulation/node.go
index 2d5c7a4..710b5e9 100644
--- a/simulation/node.go
+++ b/simulation/node.go
@@ -41,14 +41,12 @@ type node struct {
ID types.NodeID
chainID uint64
prvKey crypto.PrivateKey
- sigToPub core.SigToPubFn
consensus *core.Consensus
}
// newNode returns a new empty node.
func newNode(
prvKey crypto.PrivateKey,
- sigToPub core.SigToPubFn,
config config.Config) *node {
id := types.NewNodeID(prvKey.PublicKey())
@@ -62,7 +60,6 @@ func newNode(
return &node{
ID: id,
prvKey: prvKey,
- sigToPub: sigToPub,
config: config.Node,
app: newSimApp(id, netModule),
gov: gov,
@@ -100,7 +97,7 @@ func (n *node) run(serverEndpoint interface{}, legacy bool) {
}
}
n.consensus = core.NewConsensus(
- n.app, n.gov, n.db, n.netModule, n.prvKey, n.sigToPub)
+ n.app, n.gov, n.db, n.netModule, n.prvKey)
if legacy {
go n.consensus.RunLegacy()
} else {
diff --git a/simulation/simulation.go b/simulation/simulation.go
index c14c953..2b22dd5 100644
--- a/simulation/simulation.go
+++ b/simulation/simulation.go
@@ -39,7 +39,7 @@ func Run(cfg *config.Config, legacy bool) {
if err != nil {
panic(err)
}
- v := newNode(prv, eth.SigToPub, *cfg)
+ v := newNode(prv, *cfg)
wg.Add(1)
go func() {
defer wg.Done()