Skip to content

Commit

Permalink
Add helper function for depositTx receipt
Browse files Browse the repository at this point in the history
  • Loading branch information
pcw109550 committed Apr 19, 2023
1 parent e68e3a8 commit 965331c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/types/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ func NewReceipt(failed bool, cumulativeGasUsed uint64) *Receipt {
return r
}

func (r Receipt) IsDepositTxReceipt() bool {
return r.Type == DepositTxType
}

// EncodeRLP implements rlp.Encoder, and flattens the consensus fields of a receipt
// into an RLP stream. If no post state is present, byzantium fork is assumed.
func (r Receipt) EncodeRLP(w io.Writer) error {
Expand Down

0 comments on commit 965331c

Please sign in to comment.