changes based on review

pull/391/head
ak 6 years ago
parent 57ea3a66c4
commit 0b3f44a3e8
  1. 67
      node/contract.go
  2. 11
      node/node.go

File diff suppressed because one or more lines are too long

@ -285,8 +285,6 @@ func New(host p2p.Host, consensus *bft.Consensus, db ethdb.Database) *Node {
node.BlockChannel = make(chan *types.Block)
node.TxPool = core.NewTxPool(core.DefaultTxPoolConfig, params.TestChainConfig, chain)
node.Worker = worker.New(params.TestChainConfig, chain, node.Consensus, pki.GetAddressFromPublicKey(node.SelfPeer.PubKey), node.Consensus.ShardID)
node.AccountKey, _ = ecdsa.GenerateKey(crypto.S256(), strings.NewReader(node.SelfPeer.IP+node.SelfPeer.Port))
node.FundMyAccount()
node.AddFaucetContractToPendingTransactions()
if node.Role == BeaconLeader {
node.AddDepositContractToPendingTransactions()
@ -762,12 +760,3 @@ func (node *Node) RunServices() {
}
node.serviceManager.RunServices()
}
//FundMyAccount creates node key and address and funds them.
func (node *Node) FundMyAccount() common.Address {
//Fund the Account with the AccountKey == node.AccountKey
// Return the address of the account.
fmt.Println(node.AccountKey)
var address common.Address
return address
}

Loading…
Cancel
Save