From 965331cc1ab484804e22819fdd7f50187f8deb01 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Wed, 19 Apr 2023 20:00:10 +0900 Subject: [PATCH] Add helper function for depositTx receipt --- core/types/receipt.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/types/receipt.go b/core/types/receipt.go index cfa8465e488..de6ede9d572 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -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 {