|
|
@ -285,8 +285,6 @@ func New(host p2p.Host, consensus *bft.Consensus, db ethdb.Database) *Node { |
|
|
|
node.BlockChannel = make(chan *types.Block) |
|
|
|
node.BlockChannel = make(chan *types.Block) |
|
|
|
node.TxPool = core.NewTxPool(core.DefaultTxPoolConfig, params.TestChainConfig, chain) |
|
|
|
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.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() |
|
|
|
node.AddFaucetContractToPendingTransactions() |
|
|
|
if node.Role == BeaconLeader { |
|
|
|
if node.Role == BeaconLeader { |
|
|
|
node.AddDepositContractToPendingTransactions() |
|
|
|
node.AddDepositContractToPendingTransactions() |
|
|
@ -762,12 +760,3 @@ func (node *Node) RunServices() { |
|
|
|
} |
|
|
|
} |
|
|
|
node.serviceManager.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 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|