Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
9cf9fae6
Unverified
Commit
9cf9fae6
authored
1 year ago
by
Martin Holst Swende
Committed by
GitHub
1 year ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/types: add support for BlobTxType receipts (#27470)
Co-authored-by:
Felix Lange
<
fjl@twurst.com
>
parent
93ecd77d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
receipt.go
core/types/receipt.go
+7
-8
No files found.
core/types/receipt.go
View file @
9cf9fae6
...
...
@@ -194,7 +194,7 @@ func (r *Receipt) decodeTyped(b []byte) error {
return
errShortTypedReceipt
}
switch
b
[
0
]
{
case
DynamicFeeTxType
,
AccessListTxType
:
case
DynamicFeeTxType
,
AccessListTxType
,
BlobTxType
:
var
data
receiptRLP
err
:=
rlp
.
DecodeBytes
(
b
[
1
:
],
&
data
)
if
err
!=
nil
{
...
...
@@ -296,14 +296,13 @@ func (rs Receipts) Len() int { return len(rs) }
func
(
rs
Receipts
)
EncodeIndex
(
i
int
,
w
*
bytes
.
Buffer
)
{
r
:=
rs
[
i
]
data
:=
&
receiptRLP
{
r
.
statusEncoding
(),
r
.
CumulativeGasUsed
,
r
.
Bloom
,
r
.
Logs
}
switch
r
.
Type
{
case
LegacyTxType
:
rlp
.
Encode
(
w
,
data
)
case
AccessListTxType
:
w
.
WriteByte
(
AccessListTxType
)
if
r
.
Type
==
LegacyTxType
{
rlp
.
Encode
(
w
,
data
)
case
DynamicFeeTxType
:
w
.
WriteByte
(
DynamicFeeTxType
)
return
}
w
.
WriteByte
(
r
.
Type
)
switch
r
.
Type
{
case
AccessListTxType
,
DynamicFeeTxType
,
BlobTxType
:
rlp
.
Encode
(
w
,
data
)
default
:
// For unsupported types, write nothing. Since this is for
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment