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

fix from addr

parent a002f054
...@@ -55,13 +55,13 @@ func GetSendRecord(id uuid.UUID) (SendRecord, bool) { ...@@ -55,13 +55,13 @@ func GetSendRecord(id uuid.UUID) (SendRecord, bool) {
} }
} }
recordAsJson, err := redisCli.Get(context.Background(), id.String()).Result() // recordAsJson, err := redisCli.Get(context.Background(), id.String()).Result()
if err != nil { // if err != nil {
panic(err) // panic(err)
} // }
fmt.Printf("recordAsJson: %s \n", recordAsJson) // fmt.Printf("recordAsJson: %s \n", recordAsJson)
// sendRec := SendRecord{} // sendRec := SendRecord{}
...@@ -500,6 +500,8 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in ...@@ -500,6 +500,8 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in
var tx *types.Transaction var tx *types.Transaction
var err error var err error
fmt.Printf("param fromAddr: %s systemFromAddr: %s \n ", fromAddr, systemFromAddr)
if fromAddr != systemFromAddr && first { if fromAddr != systemFromAddr && first {
tx, err = buildOriginalTx(originalTxParam.Nonce, common.HexToAddress(fromAddr), amount*int64(txCount), big.NewInt(256), nil) tx, err = buildOriginalTx(originalTxParam.Nonce, common.HexToAddress(fromAddr), amount*int64(txCount), big.NewInt(256), nil)
first = false first = false
...@@ -532,7 +534,7 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in ...@@ -532,7 +534,7 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in
tx}) tx})
} else { } else {
txs = append(txs, TxWithFrom{ txs = append(txs, TxWithFrom{
originalTxParam.FromAddr[:], common.HexToAddress(fromAddr).Bytes(),
tx}) tx})
} }
......
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