From 8486b6533983a4f6a9c64f2979fce4fc77a6f510 Mon Sep 17 00:00:00 2001 From: Musiczombie Date: Sat, 4 Jan 2020 11:57:14 +0800 Subject: [PATCH] fix internal state bug --- task/internal.go | 4 ++-- task/token.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/task/internal.go b/task/internal.go index 629f4f5..20a3b00 100644 --- a/task/internal.go +++ b/task/internal.go @@ -21,10 +21,10 @@ const maxuint = 2147483647 func (i *InternalTask) analysisInternalAction(data *types.BlockAndResult, dbTx *sql.Tx) error { for i, itx := range data.DetailTxs { tx := data.Block.Txs[i] - receipt := data.Receipts[i] + //receipt := data.Receipts[i] for j, ias := range itx.InternalActions { a := tx.RPCActions[j] - ar := receipt.ActionResults[j] + //ar := receipt.ActionResults[j] for k, ia := range ias.InternalLogs { if ia.Action.Type == types.CallContract { if bytes.Equal(ia.Action.Payload, []byte{}) { diff --git a/task/token.go b/task/token.go index f88a49d..17d2361 100644 --- a/task/token.go +++ b/task/token.go @@ -92,8 +92,8 @@ func (t *TokenTask) analysisToken(block *TaskChanData) { //internal transaction internalTxs := block.Block.DetailTxs - for i, tx := range internalTxs { - for j, action := range tx.InternalActions { + for _, tx := range internalTxs { + for _, action := range tx.InternalActions { //if receipts[i].ActionResults[j].Status == types.ReceiptStatusSuccessful { for _, internalLog := range action.InternalLogs { if internalLog.Error != "" {