Skip to content

Commit

Permalink
fix internal state bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Musiczombie committed Jan 4, 2020
1 parent 8ce3577 commit 8486b65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions task/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}) {
Expand Down
4 changes: 2 additions & 2 deletions task/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down

0 comments on commit 8486b65

Please sign in to comment.