Commit 60d515e3 authored by 李伟@五瓣科技's avatar 李伟@五瓣科技

test amount

parent 883f7be9
...@@ -14,7 +14,7 @@ func buildSendTx(nonce uint64, to common.Address, amount *big.Int, gasLimit uint ...@@ -14,7 +14,7 @@ func buildSendTx(nonce uint64, to common.Address, amount *big.Int, gasLimit uint
func buildOriginalTx(nonce uint64, to common.Address, amount int64, chainId *big.Int, privateKey *ecdsa.PrivateKey) (*types.Transaction, error) { func buildOriginalTx(nonce uint64, to common.Address, amount int64, chainId *big.Int, privateKey *ecdsa.PrivateKey) (*types.Transaction, error) {
return buildTx(nonce, to, big.NewInt(int64(amount)), 0, big.NewInt(0), nil, chainId, privateKey) return buildTx(nonce, to, big.NewInt(amount), 0, big.NewInt(0), nil, chainId, privateKey)
} }
......
...@@ -401,7 +401,7 @@ type TxParams struct { ...@@ -401,7 +401,7 @@ type TxParams struct {
BatchTxSize int64 `json:"batch_tx_size,omitempty"` BatchTxSize int64 `json:"batch_tx_size,omitempty"`
BatchTxHashSize int64 `json:"batch_tx_hash_size,omitempty"` BatchTxHashSize int64 `json:"batch_tx_hash_size,omitempty"`
TxCount int64 `json:"tx_count"` TxCount int64 `json:"tx_count"`
EveryTxAmount int64 `json:"every_tx_amount"` EveryTxAmount int64 `json:"everyTxAmount"`
//Rate int64 `json:"rate"` //Rate int64 `json:"rate"`
//ExpectedTime int64 `json:"expected_time"` //ExpectedTime int64 `json:"expected_time"`
} }
...@@ -521,6 +521,8 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in ...@@ -521,6 +521,8 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in
tx, err = buildOriginalTx(originalTxParam.Nonce, common.HexToAddress(fromAddr), requestAmount, big.NewInt(256), nil) tx, err = buildOriginalTx(originalTxParam.Nonce, common.HexToAddress(fromAddr), requestAmount, big.NewInt(256), nil)
} else { } else {
fmt.Printf("amount: %d \n", amount)
tx, err = buildOriginalTx(originalTxParam.Nonce, common.HexToAddress(toAddrs[i%addrsL]), amount, big.NewInt(256), nil) tx, err = buildOriginalTx(originalTxParam.Nonce, common.HexToAddress(toAddrs[i%addrsL]), amount, big.NewInt(256), nil)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment