Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
exchain
nebula
Commits
9871b9ac
Unverified
Commit
9871b9ac
authored
Apr 14, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node,op-program: tx hashing function naming
parent
04a75430
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
transactions.go
op-node/eth/transactions.go
+2
-1
eth_client.go
op-node/sources/eth_client.go
+1
-1
oracle.go
op-program/client/l1/oracle.go
+1
-1
No files found.
op-node/eth/transactions.go
View file @
9871b9ac
...
@@ -34,7 +34,8 @@ func DecodeTransactions(data []hexutil.Bytes) ([]*types.Transaction, error) {
...
@@ -34,7 +34,8 @@ func DecodeTransactions(data []hexutil.Bytes) ([]*types.Transaction, error) {
return
dest
,
nil
return
dest
,
nil
}
}
func
HashTransactions
(
elems
[]
*
types
.
Transaction
)
[]
common
.
Hash
{
// TransactionsToHashes computes the transaction-hash for every transaction in the input.
func
TransactionsToHashes
(
elems
[]
*
types
.
Transaction
)
[]
common
.
Hash
{
out
:=
make
([]
common
.
Hash
,
len
(
elems
))
out
:=
make
([]
common
.
Hash
,
len
(
elems
))
for
i
,
el
:=
range
elems
{
for
i
,
el
:=
range
elems
{
out
[
i
]
=
el
.
Hash
()
out
[
i
]
=
el
.
Hash
()
...
...
op-node/sources/eth_client.go
View file @
9871b9ac
...
@@ -356,7 +356,7 @@ func (s *EthClient) FetchReceipts(ctx context.Context, blockHash common.Hash) (e
...
@@ -356,7 +356,7 @@ func (s *EthClient) FetchReceipts(ctx context.Context, blockHash common.Hash) (e
if
v
,
ok
:=
s
.
receiptsCache
.
Get
(
blockHash
);
ok
{
if
v
,
ok
:=
s
.
receiptsCache
.
Get
(
blockHash
);
ok
{
job
=
v
.
(
*
receiptsFetchingJob
)
job
=
v
.
(
*
receiptsFetchingJob
)
}
else
{
}
else
{
txHashes
:=
eth
.
HashTransaction
s
(
txs
)
txHashes
:=
eth
.
TransactionsToHashe
s
(
txs
)
job
=
NewReceiptsFetchingJob
(
s
,
s
.
client
,
s
.
maxBatchSize
,
eth
.
ToBlockID
(
info
),
info
.
ReceiptHash
(),
txHashes
)
job
=
NewReceiptsFetchingJob
(
s
,
s
.
client
,
s
.
maxBatchSize
,
eth
.
ToBlockID
(
info
),
info
.
ReceiptHash
(),
txHashes
)
s
.
receiptsCache
.
Add
(
blockHash
,
job
)
s
.
receiptsCache
.
Add
(
blockHash
,
job
)
}
}
...
...
op-program/client/l1/oracle.go
View file @
9871b9ac
...
@@ -78,7 +78,7 @@ func (p *PreimageOracle) ReceiptsByBlockHash(blockHash common.Hash) (eth.BlockIn
...
@@ -78,7 +78,7 @@ func (p *PreimageOracle) ReceiptsByBlockHash(blockHash common.Hash) (eth.BlockIn
return
p
.
oracle
.
Get
(
preimage
.
Keccak256Key
(
key
))
return
p
.
oracle
.
Get
(
preimage
.
Keccak256Key
(
key
))
})
})
txHashes
:=
eth
.
HashTransaction
s
(
txs
)
txHashes
:=
eth
.
TransactionsToHashe
s
(
txs
)
receipts
,
err
:=
eth
.
DecodeRawReceipts
(
eth
.
ToBlockID
(
info
),
opaqueReceipts
,
txHashes
)
receipts
,
err
:=
eth
.
DecodeRawReceipts
(
eth
.
ToBlockID
(
info
),
opaqueReceipts
,
txHashes
)
if
err
!=
nil
{
if
err
!=
nil
{
panic
(
fmt
.
Errorf
(
"bad receipts data for block %s: %w"
,
blockHash
,
err
))
panic
(
fmt
.
Errorf
(
"bad receipts data for block %s: %w"
,
blockHash
,
err
))
...
...
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