Skip to content

Commit

Permalink
fix type on blobTxSidecars codec
Browse files Browse the repository at this point in the history
Signed-off-by: Pranay Valson <pranay.valson@gmail.com>
  • Loading branch information
noslav committed Mar 28, 2024
1 parent d5677da commit 3611892
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions codec/block-ethereum.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -577,13 +577,13 @@
"default":"null"
},
{
"name":"BlobTxSidecar",
"name":"BlobTxSidecars",
"type":[
"null",
{
"type":"array",
"items":{
"name":"BlobTxSidecar_record",
"name":"BlobTxSidecars_record",
"type":"record",
"fields":[
{
Expand Down
8 changes: 4 additions & 4 deletions internal/utils/lenspath.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
var dataLens = createLenspath([]string{"replicaEvent", "*", "data"})
var withdrawalsLens = composeLenspath(dataLens, []string{"Withdrawals"})
var uncleLens = composeLenspath(dataLens, []string{"Uncles"})
var blobTxSidecarLens = composeLenspath(dataLens, []string{"BlobTxSidecar"})
var blobTxSidecarsLens = composeLenspath(dataLens, []string{"BlobTxSidecars"})

// transactions
var transactionsLens = composeLenspath(dataLens, []string{"Transactions", "*"})
Expand All @@ -21,9 +21,9 @@ var toLens = composeLenspath(transactionsLens, []string{"to"})
var fromLens = composeLenspath(transactionsLens, []string{"from"})

// blob data
var blobsLens = composeLenspath(blobTxSidecarLens, []string{"Blobs"})
var commitmentsLens = composeLenspath(blobTxSidecarLens, []string{"Commitments"})
var proofsLens = composeLenspath(blobTxSidecarLens, []string{"Proofs"})
var blobsLens = composeLenspath(blobTxSidecarsLens, []string{"Blobs"})
var commitmentsLens = composeLenspath(blobTxSidecarsLens, []string{"Commitments"})
var proofsLens = composeLenspath(blobTxSidecarsLens, []string{"Proofs"})

// blob tx fields
var blobFeeCapLens = composeLenspath(transactionsLens, []string{"blobFeeCap"})
Expand Down
4 changes: 2 additions & 2 deletions internal/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func UnwrapAvroUnion(data map[string]interface{}) map[string]interface{} {
unwrapType(data, blobHashesLens, "array")
unwrapType(data, blobGasLens, "int")

unwrapType(data, blobTxSidecarLens, "array")
unwrapType(data, blobTxSidecarsLens, "array")
unwrapType(data, blobsLens, "string")
unwrapType(data, commitmentsLens, "string")
unwrapType(data, proofsLens, "string")
Expand Down Expand Up @@ -280,7 +280,7 @@ func MapToAvroUnion(data map[string]interface{}) map[string]interface{} {
wrapType(data, blobHashesLens, "array")
wrapType(data, blobGasLens, "int")

wrapType(data, blobTxSidecarLens, "array")
wrapType(data, blobTxSidecarsLens, "array")
wrapType(data, blobsLens, "string")
wrapType(data, commitmentsLens, "string")
wrapType(data, proofsLens, "string")
Expand Down

0 comments on commit 3611892

Please sign in to comment.