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

merge

parents f711527d d32c2dee
......@@ -89,6 +89,7 @@ func (c *EthClient) GenerateTx() (*types.Transaction, error) {
// if err != nil {
// return nil, err
// }
txs, md5data, err := getBatchTx(3, c.NodeRpcURL, false)
if err != nil {
return nil, err
......@@ -101,8 +102,10 @@ func (c *EthClient) GenerateTx() (*types.Transaction, error) {
// })
//fmt.Printf("gasLimit: %d gasPrice: %d \n", gasLimit, gasPrice)
tx := types.NewTransaction(nonce, toAddress, big.NewInt(10000000000000), 24894, big.NewInt(1000000000), md5data)
//tx := types.NewTransaction(nonce, toAddress, big.NewInt(10000000000000), 24894, big.NewInt(1000000000), data)
signedTx, err := types.SignTx(tx, types.NewEIP155Signer(big.NewInt(256)), privateKeyAsECDSA)
if err != nil {
return nil, err
......@@ -190,9 +193,9 @@ func getBatchTx(txNum int, nodeUrl string, signed bool) ([]Md5tx, []byte, error)
}
if i == txNum {
err = rdb.LPush(ctx, "list", md5TxAsJson).Err()
err = rdb.LPush(ctx, "list-liwei", md5TxAsJson).Err()
} else {
rdb.LPush(ctx, "list", md5TxAsJson)
rdb.LPush(ctx, "list-liwei", md5TxAsJson)
}
if err != 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