check tx receipt status

This commit is contained in:
Nguyen Sy Thanh Son 2019-01-04 09:42:41 +00:00
parent 2ed47cf48e
commit 3c7ced7e1e
2 changed files with 13 additions and 1 deletions

View file

@ -867,6 +867,19 @@ func (c *Posv) Finalize(chain consensus.ChainReader, header *types.Header, state
blkHash := common.BytesToHash(tx.Data()[len(tx.Data())-32:])
from := *tx.From()
var b uint
for _, r := range receipts {
if r.TxHash == tx.Hash() {
b = r.Status
break
}
}
if b == types.ReceiptStatusFailed {
fmt.Println("Tx receipt status false")
continue
}
var lAddr []common.Address
if cached, ok := c.BlockSigners.Get(blkHash); ok {
lAddr = cached.([]common.Address)

View file

@ -397,7 +397,6 @@ func GetRewardForCheckpoint(c *posv.Posv, chain consensus.ChainReader, blockSign
wg.Wait()
}
fmt.Println("c.BlockSigners.Len()", c.BlockSigners.Len())
fmt.Println("totalSigner", *totalSigner)
}