mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-05 09:14:28 +00:00
Drop Transaction Count for Transaction Generator (#13228)
* reduce * comment
This commit is contained in:
parent
ca36634de6
commit
d8b38cf230
@ -28,6 +28,8 @@ import (
|
|||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const txCount = 20
|
||||||
|
|
||||||
var fundedAccount *keystore.Key
|
var fundedAccount *keystore.Key
|
||||||
|
|
||||||
type TransactionGenerator struct {
|
type TransactionGenerator struct {
|
||||||
@ -82,7 +84,7 @@ func (t *TransactionGenerator) Start(ctx context.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
f := filler.NewFiller(rnd)
|
f := filler.NewFiller(rnd)
|
||||||
// Broadcast Transactions every 3 blocks
|
// Broadcast Transactions every slot
|
||||||
txPeriod := time.Duration(params.BeaconConfig().SecondsPerSlot) * time.Second
|
txPeriod := time.Duration(params.BeaconConfig().SecondsPerSlot) * time.Second
|
||||||
ticker := time.NewTicker(txPeriod)
|
ticker := time.NewTicker(txPeriod)
|
||||||
gasPrice := big.NewInt(1e11)
|
gasPrice := big.NewInt(1e11)
|
||||||
@ -92,7 +94,7 @@ func (t *TransactionGenerator) Start(ctx context.Context) error {
|
|||||||
return nil
|
return nil
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
backend := ethclient.NewClient(client)
|
backend := ethclient.NewClient(client)
|
||||||
err = SendTransaction(client, mineKey.PrivateKey, f, gasPrice, mineKey.Address.String(), 100, backend, false)
|
err = SendTransaction(client, mineKey.PrivateKey, f, gasPrice, mineKey.Address.String(), txCount, backend, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user