mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
Merge pull request #407 from thanhson1085/master
fix bug receipt status
This commit is contained in:
commit
fe448f6a50
2 changed files with 11 additions and 5 deletions
|
|
@ -1032,13 +1032,16 @@ func (c *Posv) CacheData(header *types.Header, txs []*types.Transaction, receipt
|
|||
var b uint
|
||||
for _, r := range receipts {
|
||||
if r.TxHash == tx.Hash() {
|
||||
b = r.Status
|
||||
if len(r.PostState) > 0 {
|
||||
b = types.ReceiptStatusSuccessful
|
||||
} else {
|
||||
b = r.Status
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if b == types.ReceiptStatusFailed {
|
||||
log.Debug("Sign tx failed", "hash", tx.Hash().String())
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -340,13 +340,16 @@ func GetRewardForCheckpoint(c *posv.Posv, chain consensus.ChainReader, number ui
|
|||
var b uint
|
||||
for _, r := range receipts {
|
||||
if r.TxHash == tx.Hash() {
|
||||
b = r.Status
|
||||
if len(r.PostState) > 0 {
|
||||
b = types.ReceiptStatusSuccessful
|
||||
} else {
|
||||
b = r.Status
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if b == types.ReceiptStatusFailed && i >= rCheckpoint {
|
||||
log.Debug("Sign tx failed", "hash", tx.Hash().String())
|
||||
if b == types.ReceiptStatusFailed {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue