Skip to content

Commit

Permalink
bugfix: Node crash if the etxEntry doesnt exist
Browse files Browse the repository at this point in the history
This bug was introduced in ad55eae commit
  • Loading branch information
gameofpointers committed Aug 18, 2023
1 parent 8a4a079 commit d936741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (p *StateProcessor) Process(block *types.Block, etxSet types.EtxSet) (types
startTimeEtx := time.Now()
etxEntry, exists := etxSet[tx.Hash()]
if !exists { // Verify that the ETX exists in the set
return nil, nil, nil, 0, fmt.Errorf("invalid external transaction: etx %x not found in unspent etx set", etxEntry.ETX.Hash())
return nil, nil, nil, 0, fmt.Errorf("invalid external transaction: etx %x not found in unspent etx set", tx.Hash())
}
prevZeroBal := prepareApplyETX(statedb, &etxEntry.ETX)
receipt, err = applyTransaction(msg, p.config, p.hc, nil, gp, statedb, blockNumber, blockHash, &etxEntry.ETX, usedGas, vmenv, &etxRLimit, &etxPLimit)
Expand Down

0 comments on commit d936741

Please sign in to comment.