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

remove duplicate tx

parent 2a3647b6
...@@ -81,13 +81,13 @@ func SetSendRecord(id uuid.UUID, value SendRecord) { ...@@ -81,13 +81,13 @@ func SetSendRecord(id uuid.UUID, value SendRecord) {
sent += v.TxNum sent += v.TxNum
} }
if sent == int(value.TotalConsTx) { // if sent == int(value.TotalConsTx) {
recoradAsJson, err := json.Marshal(value) // recoradAsJson, err := json.Marshal(value)
if err != nil { // if err != nil {
panic(err) // panic(err)
} // }
redisCli.Set(context.Background(), id.String(), recoradAsJson, time.Hour*24) // redisCli.Set(context.Background(), id.String(), recoradAsJson, time.Hour*24)
} // }
} }
type SendRecord struct { type SendRecord struct {
...@@ -536,10 +536,6 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in ...@@ -536,10 +536,6 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in
tx}) tx})
} }
txs = append(txs, TxWithFrom{
originalTxParam.FromAddr[:],
tx})
txshash = append(txshash, tx.Hash().String()) txshash = append(txshash, tx.Hash().String())
txCount-- txCount--
......
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