// DepositToFakeAccounts invokes the faucet contract to give the walletAddress initial money
func(node*Node)DepositToFakeAccounts(){
for_,deployAccount:=rangecontract.FakeAccounts{
// DepositToStakingAccounts invokes the faucet contract to give the staking accounts initial money
func(node*Node)DepositToStakingAccounts(){
state,err:=node.blockchain.State()
iferr!=nil{
log.Error("Failed to get chain state","Error",err)
}
nonce:=state.GetNonce(crypto.PubkeyToAddress(node.ContractDeployerKey.PublicKey))+1// + 1 because deployer key is already used for faucet contract deployment
contractKey,_:=ecdsa.GenerateKey(crypto.S256(),strings.NewReader("Test contract key string stream that is fixed so that generated test key are deterministic every time"))
node.AddStakingContractToPendingTransactions()//This will save the latest information about staked nodes in current staked
node.DepositToFakeAccounts()
}
contractDeployerKey,_:=ecdsa.GenerateKey(crypto.S256(),strings.NewReader("Test contract key string stream that is fixed so that generated test key are deterministic every time"))
utils.GetLogInstance().Debug("Proposing New Block...","threshold",threshold,"pendingTransactions",len(node.pendingTransactions))
iflen(node.pendingTransactions)>=threshold{
utils.GetLogInstance().Debug("PROPOSING NEW BLOCK ------------------------------------------------","threshold",threshold,"pendingTransactions",len(node.pendingTransactions))