core, eth, les, light: store transaction receipts without txHash and gasCost

This commit is contained in:
Matthew Halpern
2019-03-27 09:11:24 -07:00
committed by Péter Szilágyi
parent 1528b791ac
commit 6b0ddd141e
11 changed files with 552 additions and 123 deletions

View File

@ -104,6 +104,15 @@ func (b *BlockGen) AddTxWithChain(bc *BlockChain, tx *types.Transaction) {
b.receipts = append(b.receipts, receipt)
}
// AddUncheckedTx forcefully adds a transaction to the block without any
// validation.
//
// AddUncheckedTx will cause consensus failures when used during real
// chain processing. This is best used in conjunction with raw block insertion.
func (b *BlockGen) AddUncheckedTx(tx *types.Transaction) {
b.txs = append(b.txs, tx)
}
// Number returns the block number of the block being generated.
func (b *BlockGen) Number() *big.Int {
return new(big.Int).Set(b.header.Number)