mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
fix bug receipt status
This commit is contained in:
parent
9a9ecc37a3
commit
8f4705c3a8
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
|
var b uint
|
||||||
for _, r := range receipts {
|
for _, r := range receipts {
|
||||||
if r.TxHash == tx.Hash() {
|
if r.TxHash == tx.Hash() {
|
||||||
b = r.Status
|
if len(r.PostState) > 0 {
|
||||||
|
b = types.ReceiptStatusSuccessful
|
||||||
|
} else {
|
||||||
|
b = r.Status
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if b == types.ReceiptStatusFailed {
|
if b == types.ReceiptStatusFailed {
|
||||||
log.Debug("Sign tx failed", "hash", tx.Hash().String())
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -340,13 +340,16 @@ func GetRewardForCheckpoint(c *posv.Posv, chain consensus.ChainReader, number ui
|
||||||
var b uint
|
var b uint
|
||||||
for _, r := range receipts {
|
for _, r := range receipts {
|
||||||
if r.TxHash == tx.Hash() {
|
if r.TxHash == tx.Hash() {
|
||||||
b = r.Status
|
if len(r.PostState) > 0 {
|
||||||
|
b = types.ReceiptStatusSuccessful
|
||||||
|
} else {
|
||||||
|
b = r.Status
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if b == types.ReceiptStatusFailed && i >= rCheckpoint {
|
if b == types.ReceiptStatusFailed {
|
||||||
log.Debug("Sign tx failed", "hash", tx.Hash().String())
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue