mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
add loop to send transactions
This commit is contained in:
parent
17bbad3d9b
commit
358f6a8aaf
1 changed files with 24 additions and 23 deletions
|
|
@ -2,15 +2,15 @@ var firstAccount = web3.eth.accounts[0]
|
|||
var secondAccount = web3.eth.accounts[1]
|
||||
var thirdAccount = web3.eth.accounts[2]
|
||||
|
||||
console.log(firstAccount)
|
||||
|
||||
for (var i = 0; i < 50; i++) {
|
||||
console.log('\t\t' +i+ ' - iterations')
|
||||
web3.eth.sendTransaction({
|
||||
from: web3.eth.accounts[0],
|
||||
to: web3.eth.accounts[1],
|
||||
value: 623,
|
||||
gas: 50000,
|
||||
gasPrice: 20
|
||||
})
|
||||
});
|
||||
|
||||
web3.eth.sendTransaction({
|
||||
from: web3.eth.accounts[0],
|
||||
|
|
@ -18,7 +18,7 @@ web3.eth.sendTransaction({
|
|||
value: 291,
|
||||
gas: 50000,
|
||||
gasPrice: 20
|
||||
})
|
||||
});
|
||||
|
||||
web3.eth.sendTransaction({
|
||||
from: web3.eth.accounts[1],
|
||||
|
|
@ -26,4 +26,5 @@ web3.eth.sendTransaction({
|
|||
value: 53039,
|
||||
gas: 50000,
|
||||
gasPrice: 20
|
||||
})
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue